master server down - lvs cluster default to emergency server

Sébastien BONNET sebastien.bonnet at experian.fr
Mon Jun 7 14:52:09 UTC 2004


> I understand that I can configure piranha via lvs.cf to make healt 
> checks on the  httpd service as well as on the mysql server

So you're using both lvs and fos (as piranha services)

> I need to announce to all web users a 'server down' page.
> I do this by directing all http/https requests to an emergency server.

Piranha does not have this emergency/sorry server feature, but you can 
use trick to simulate it.

> It's apache server is configured to show the same emergence page for any
> URL it receives. The emergency apache server runs on the router/director
> itself.

Why don't you keep your 2 RS when the DB is down ? You could have them 
handle the "no db" problem in your web application (instead as url 
rewriting in apache).

> How con I configure piranha lvs.cf in such a way, that, if the mysql 
> health check fails, it redirects all http and https request coming into 
> the LVS to the emergyency http server?

If you still want to do it this way, make your health check return OK on 
the RS and FAIL on the Director when the DB is online and FAIL on the RS 
and OK on the director when un DB is unavailable.

This way, the director will come online when RS are removed because of a 
DB problem and offline when RS are added back (when the DB comes back).

> Piranha does not have to turn the servers back on automatically, when 
> the database service recovers. In my experience, often some manual work 
> is required on the dbms server, before the web service can be resumed.

Can't do that ! But if your health check is correctly done, the RS will 
not come back online if it can't access correctly the DB.

Regards,

-- 
Sébastien BONNET





More information about the Piranha-list mailing list