There are three ways to update the running configuration in HAProxy: by restarting, reloading, or hitless reloading.
Restart: The existing HAProxy process is stopped and a new one is started.
Reload: A new process is started and the old process is instructed to close its sockets once it is ready. This results in about 100ns where the old process can refuse connections.
Hitless reload: The new process reads the sockets from the old process via the socket, so that there are no refused connections.
With reloads or hitless reloads, the old process will keep running until its existing connections are concluded. For keep-alive connections, the next response from it will have a connection; you can close the header to speed that process along. With a restart, existing connections will be interrupted.
The init script currently supports restart and reload, but hitless reloads require the following configuration.
Hitless reloads are available in HAProxy Enterprise 1.7r1 and later.
Configuring a hitless reload
Before you start, you need to know the locations for the following:
HAProxy socket (if using
nbproc > 1, you only need a socket for one of the processes)
The HAProxy binary (usually
If unsure where to find this information:
ps auxw | grep hapee-lbto display everything (except socket locations).
Look for 'stats socket' in the 'global' for socket locations.
Prepare the configuration
In the configuration file's 'global' section at the top, locate the 'stats socket' line similar to the following: (if you do not see it, you must create it)
stats socket /var/run/hapee-1.7/hapee-lb.sock user hapee-lb group hapee mode 660 level admin
expose-fd listenersto this line, as follows:
stats socket /var/run/hapee-1.7/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listeners
Run a normal reload on HAProxy Enterprise for a last time, with:
service hapee-1.7-lb reload
Performing a hitless reload
For versions running systemd:
service 1.7-lb reload.
If the currently running process has
expose-fd listeners, the master process then automatically appends
-x to the socket path of the new worker processes.
When you add
expose-fd listeners for the first time, it performs a normal reload, as the existing process does not send its FD sockets to the new process.