Standby/backup with >2 nodes

From: Jim Riggs <freebsd-lists#christianserving.org>
Date: Thu, 3 Dec 2009 14:46:40 -0600


There may well be a simple configuration that will allow me to accomplish this, but google and the mailing list archives have stymied me thus far. It may be my newness to haproxy and its configuration or just that others aren't doing this type of setup, but I'm hoping someone can help.

What I want is this: 3 backend servers (now -- likely more in the future), 2 active and 1 standby/backup. But I don't want it to be a backup in the sense that I read in the documentation (it only becomes active if all active servers are down). What I need is that if either of the active servers goes down, the standby becomes active (always have 2 active servers available). So, visually:

web1 (active)  -- failure (apache crash) --> (down)
web2 (active)  ----------------------------> (active)
web3 (standby) -- detect web1 failure -----> (active)

In the general case, though, I don't want web3 to get any traffic until one of the other servers fails. I also need to be able to handle the case where I have say 3 active and 2 standby servers. I am not doing anything with cookies or sticky sessions, so that is not a concern.

Is there some simple configuration option(s) staring me in the face that I'm missing, or is this more complex than it seems on the surface?

TIA!

Received on 2009/12/03 21:46

This archive was generated by hypermail 2.2.0 : 2009/12/03 22:00 CET