Hi James, On Wed, Dec 22, 2010 at 06:25:47PM -0500, james q wrote: > Hello everyone, > > I have a quick question on how I would achieve synchronized server > failover. Basically, I have two backends, one for HTTP and one for > HTTPS. I want it such that if a server fails health checking on port > 80, the same server in the HTTPS backend goes down as well. But I > also want to do so vice versa. Here is a snippet so far: > > listen http 0.0.0.0:80 > mode http > balance roundrobin > > # Backend HTTP servers with health checking > server web01 a.b.c.d:80 check inter 15s rise 10 fall 3 > server web02 e.f.g.h:80 check inter 15s rise 10 fall 3 backup > > # Load balance HTTPS > listen https 0.0.0.0:443 > mode tcp > balance roundrobin > > # Backend HTTPS servers with health checking > server web01 a.b.c.d:443 check inter 15s rise 10 fall 3 > server web02 e.f.g.h:443 check inter 15s rise 10 fall 3 backup > > I know the keyword track would help, such that http/web01 can track > the health status of https/web01 ... but what about the other way as > well. I want it such that if either port 80 or port 443 fails on > web01, we go to web02 fully.
I see what you'd like, but I don't know how to do that. We would need some cross-tracking (probably not easy to implement) or to be able to check multiple ports to decide of a server's health (check scripts are planned for a future release). Right now I'm afraid you can only check one service and apply tracking on the other one. It's fairly common to have both HTTP and HTTPS handled by the same process though (eg: apache) so if one fails, the other will fail too. In this case, you only need to perform a check which ensures the service is OK (eg: run a HTTP request and check for a valid server response). Regards, Willy