global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 4096 user haproxy group haproxy daemon defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 10000 contimeout 5000 clitimeout 50000 srvtimeout 50000 frontend wt bind 0.0.0.0:80 acl srv1 url_sub wtd=wt1 acl srv2 url_sub wtd=wt2 acl srv1_up nbsrv(bck1) gt 0 acl srv2_up nbsrv(bck2) gt 0 use_backend bck1 if srv1_up srv1 use_backend bck2 if srv2_up srv2 default_backend bck_lb backend bck_lb balance roundrobin server srv1 0.0.0.0:9090 track bck1/srv1 server srv2 0.0.0.0:9091 track bck2/srv2 backend bck1 balance roundrobin server srv1 0.0.0.0:9090 check backend bck2 balance roundrobin server srv2 0.0.0.0:9091 check