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?
Cheers
Chris
Config as follows (hostnames changed to protect the innocent ;):
####################################################################
global
log 127.0.0.1 local3
#log loghost local0 info
maxconn 40000
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
stats socket /tmp/stats
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 5000
contimeout 5000
clitimeout 50000
srvtimeout 50000
option httpchk
option httpclose
option forwardfor
# enable web-stats at /haproxy?stats
listen 3632-10.10.10.172:80 10.10.10.172:80
mode http
default_backend 3632_http
backend 3632_http
balance roundrobin
mode http
cookie SERVERID insert nocache indirect
option httpchk HEAD /checklb.php HTTP/1.1\r\nHost:blah.test.co.uk
contimeout 5000
srvtimeout 50000
server web01 10.10.10.193:80 cookie web01 check inter 3000 rise 2 fall 2
weight 1
server web02 10.10.10.192:80 cookie web02 check inter 3000 rise 2 fall 2
weight 1
server web03 10.10.10.191:80 cookie web03 check inter 3000 rise 2 fall 2
weight 1
server sorry 10.10.10.184:80 cookie sorry check inter 3000 rise 2 fall 2
weight 1 backup