Simple two server failover

hello,

we need to send traffic to a master server1, then when it’s check as down (http check) … only use the backup server2 ?

here is our config, do you think it’s enought ?

backend     web-site-prod
            description  web-site-prod
            option httpchk GET /login
            http-check expect rstatus (2..|3..|401)
            server  server1.tld.fr server1.tld.fr:443  check  resolvers dns_site1 init-addr none,192.168.1.200      ssl
            server  server2.tld.fr  server2.tld.fr:443  check backup resolvers dns_site1 init-addr none,10.254.254.200 ssl

nobody can give me an example ?

we are using a failover setup for a long time.
there are two haproxy instances with keepalived and ip-failover.

this is our simple backend config

backend lbhttps
server master 12.34.56.78:443 ssl maxconn 140 check weight 1 inter 5s rise 3 fall 2 verify none
server slave 12.34.56.79:443 ssl maxconn 100 check backup weight 1 inter 5s rise 3 fall 2 verify none

1 Like