Willy Tarreau, author of HAProxy, semi-recently wrote a very in-depth article about HAProxy’s reload process and how it could, under certain conditions, drop/reset connections during reloading. With HAProxy 1.8, this will finally be no more.

I did a large project at a previous employer where we switched from layer 3/4 load balancing with keepalived to layer 7 load balancing with HAProxy (with keepalived only used to manage floating IPs between the LBs) for a number of PHP web clusters. We actually saw this issue quite a bit on the biggest clusters (and considered the SYN-packet-blocking workaround mentioned in the article) so I thought it was quite interesting.

The article gives some history on how HAProxy’s reload process came to be and goes through the HAProxy, Linux kernel and BSD socket API guts to get to the bottom of what caused it. It’s a long read, but if you think it sounds interesting I’d encourage you to read it: Truly Seamless Reloads with HAProxy – No More Hacks!