I use haproxy in front of several servers to failover. My purpose is at one time, haproxy sticks to one online server only. I can do this with option “check backup” likes below.
frontend web_front ... default_backend web_backend ... backend web_backend .... server s1 192.168.0.10:80 check server s2 192.168.0.11:80 check backup
This works well when everything ok, server
s1 will be chosen normally. When server
s1 is down,
s2 will serve.
How can I make haproxy still use
s2 even when
s1 becomes online again?