Hello all, I need some advice on how to tune haproxy to react more quickly when
an http service goes down. Recently, haproxy emitted 503s to clients for 29
seconds when one of three servers in a pool went down. "Haproxy may emit the
following status codes by itself... 503 when no server was available to handle
the request, or in response to monitoring requests which match the 'monitor
fail' condition." However there were other servers available. Here's the
timeline:
13:47:58 - http service offline
13:48:00 - 13:48:29 - 503 returned to clients of offline server, other servers
in pool continued to service clients
13:48:30-13:48:34 - haproxy stopped dispatching client requests to offline
server
13:48:34 - offline server marked down in haproxy log
Here's an example line from the 503 errors:
Oct 5 13:48:00 127.0.0.1 haproxy[20308]: 1.1.1.4:65054
[05/Oct/2010:13:48:00.662] web_pool/web4 0/0/0/0/1 503 513 - - ---- 8/1/1/0/0
0/0 "GET / HTTP/1.0"
Here's what haproxy had to say when it marked web4 offline:
Oct 5 13:48:34 127.0.0.1 haproxy[20308]: Server web_pool/web4 is DOWN. 2
active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in
queue.
Here's the config:
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
defaults
mode http
log global
option dontlognull
option httpclose
option httplog
option forwardfor
option redispatch
timeout connect 10000
timeout client 300000
timeout server 300000
maxconn 60000
retries 3
balance roundrobin
frontend web 1.1.1.1:80
default_backend web_pool
backend web_pool
server web2 web2:80 check
server web3 web3:80 check
server web4 web4:80 check
I'm using haproxy version 1.3.25. Any help appreciated!
Thanks,
Geoff