Hi,

Le 18/02/2012 05:13, Vaibhav Arora a écrit :
Hi all,

I was looking for a solution for graceful reload of haproxy. I have a
nginx server running which passes requests to Haproxy and at times I
reload the Haproxy configuration. But I am observing that at time of
reloading all the existing connections are getting cut off and haproxy
backend queue shows 0 requests ( got from socket stats of haproxy ) .

I am using the method mentioned in several blog posts and haproxy
documentation about the issue :

Reload :

haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -D -sf (

Start : haproxy -D -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid

It be grateful if someone could suggest any solution.

Well, this is how haproxy works. You won't find better currently (Simon Horman provided some patches monthes ago to do even better but this is still a work in progress I think).

It works particularly well on linux systems :
- the new haproxy process notifies the old one to softly stop.
- this new process takes the new connections
- the old one keeps the already opened connections alive until they are closed by the client or by some timeouts, then it exits once there's no more connections. Note that this is not true on FreeBSD for example, where haproxy has to completely shutdown the connections during the reload.

--
Cyril Bonté

Reply via email to