HAProxy (haproxy-1.8.8-1.el7.x86_64) seamless reload without traffic impact

Good morning.

I’m looking for a haproxy configuration with soft reload without traffic interruption or another way of doing this smooth.

HAproxy:
Version -> haproxy-1.8.8-1.el7.x86_64 (free).
Configuration -> https://pastebin.com/7AceYvyq

I found on internet this two aspects.
1). is for haproxy enterprise edition I guess: https://www.haproxy.com/blog/truly-seamless-reloads-with-haproxy-no-more-hacks/
2). Reload in a smooth manner: haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -x /var/run/haproxy/admin.sock -sf $(cat /var/run/haproxy.pid)

Any ideas/ recommendation?

Please read the management guide:

https://cbonte.github.io/haproxy-dconv/1.9/management.html

Short: soft reload is enough, seamless reload is only needed to bypass a race condition in linux, which is probably not your problem.

1 Like

Thank you @lukastribus, I’ll read the documentation for 1.9.
Now we have 1.8.8 as a version and we want when there are persistent connections if we’ll reload the haproxy to migrate the traffic smooth or to have the reload as smooth as possible.

1.8 management guide then:

https://cbonte.github.io/haproxy-dconv/1.8/management.html

There won’t be any migration. You soft reload, the old process keeps serving old connections and only exits until all of them are closed. The new process will handle new connections with updated binary and configuration.

1 Like

Thank you for the details.
Sorry for the word “migration”, I was thinking to the same thing.
There are a lot of articles here and on Internet with seamless/ soft reload and the issues regarding this configuration.
We’ll test this, I hope there will not be childs process there for haproxy, we’ve faced some issues.
Do you recommend multi-threading nbthread on haproxy?

You can limit the amount of time the old process is around with hard-stop-after (old connections are killed after the configured amount of time, so that the old process will definitely be closed after this).

Multithreading can be recommended at this point, it matured well. However, I would not recommend it if you are running 1.8.8, as there are 40 known bugs already fixed after 1.8.8 directly related to threads:

lukas@dev:~/haproxy-1.8$ git log --oneline v1.8.8.. | grep BUG | grep hread | wc -l
40
lukas@dev:~/haproxy-1.8$