Automatically changing 'backup' servers?

From: David Rorex <drorex#gmail.com>
Date: Wed, 22 Oct 2008 15:11:52 -0700


Hi, we've been using haproxy for a few months now, and it works quite well for us. However, there is one feature I'd like that appears to not currently exist, I'm wondering if you can give me any suggestions.

Basically, I have two MySQL servers configured as active / backup. Our web application connects to haproxy, which, most of the time then sends that database connection to the active server. However, if the active server goes down, it will then send the connections to the backup server.

My problem comes from what happens when the active server comes back online. If it's been down for any period of time, it may take several minutes for the database to sync up to the backup, during which time it will be out of date, so I would not want to send any users to it.

Ideally, there would be some setting where I could say "Ok, if the active server goes down, make it the backup, and then make the backup the active server". That way, when the downed server comes back online, it comes back as a 'backup' server, and no traffic gets directed to it (unless the other server then goes down).

I hope this is clear, thanks.
-David R Received on 2008/10/23 00:11

This archive was generated by hypermail 2.2.0 : 2008/10/23 00:15 CEST