Re: Backup servers in 1.3

From: Cyril Bonté <cyril.bonte#free.fr>
Date: Thu, 18 Feb 2010 21:30:02 +0100


Hi Chris,

Le Jeudi 18 Février 2010 15:57:11, Chris Sarginson a écrit :
> Hi,
>
> Earlier today we took all our primary webservers offline to perform some
> maintenance on our webservers. There is one backup server configured in
> haproxy which simply hosts a single index page, and rewrites all URLS to
> display this.
>
> Following bringing the servers back online, traffic was still being
> directed to the backup server, so my question is thus:
>
> What is the correct behaviour for a server configured as a backup in
> haproxy, once the normal servers are back online?

It depends on the configuration.
From your configuration, the behaviour is correct because of the "sorry" cookie : as soon as a response provides this cookie, all the next requests providing the same value will be directed to this server. If you want the requests return to the servers as soon as they're up again, you can remove "cookie sorry" on the backup server. Then this request will be load balanced to one of the active servers.

> server sorry 10.10.10.184:80 cookie sorry check inter 3000 rise 2 fall 2 weight 1 backup

could become :
server sorry 10.10.10.184:80 check inter 3000 rise 2 fall 2 weight 1 backup

-- 
Cyril Bonté
Received on 2010/02/18 21:30

This archive was generated by hypermail 2.2.0 : 2010/02/18 21:45 CET