Hello all!
Have some troubles with seamless reload: when haproxy reload config, it do not share backend status, so dead backend become UP for haproxy for few seconds, and incoming requests failes. How can I share backend status?
Parts of my config:
haproxy.cfg:
…
nbproc 2
cpu-map 1 0
cpu-map 2 1
pidfile /var/run/haproxy.pid
stats socket /var/run/haproxy.sock mode 660 level admin expose-fd listeners
stats timeout 2m
…
backend backend
mode http
balance roundrobin
option httpchk GET /health-check HTTP/1.0
http-check disable-on-404
server srv1 srv1:80 check
server srv2 srv2:80 check
Haproxy run script:
while true
do
sleep 10
haproxy -D -f /usr/local/etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -x /var/run/haproxy.sock -sf $(cat /var/run/haproxy.pid) > /dev/null
done