Proper way to reload HAProxy 2.9 on Ubuntu 24.04 for seamless / hitless reload?

What is the proper way to reload haproxy 2.9.7 on Ubuntu 24.04 to apply config changes while also having the reload be seamless/hitless?

I’m a little unsure if info that I read about older versions of HAProxy apply in the same way to version 2.9. For example, the “expose-fd listeners” config setting on the global stats line, I read that has something to do with seamless reloads. However, that config setting is not in the default 2.9.7 haproxy.cfg file. So maybe this is a depreciated setting?

In case it makes any difference, I installed HAProxy using the instructions at HAProxy packages for Debian and Ubuntu

The commands to restart or reload that I’m aware of are:

systemctl restart haproxy
systemctl reload haproxy
service haproxy restart
service haproxy reload

I’m thinking “systemctl reload haproxy” is the proper way to reload config changes gracefully, with seamless / hitless reloads. Is that correct?

Correct, on systemd based system (which Ubuntu is), you reload haproxy by issuing the command:

 systemctl reload haproxy

Enabling fd listeneres on a stats socket is no longer required in master-worker mode:

I read something about fd listeners and master-worker mode elsewhere, but I wasn’t sure if that was the mode HAProxy is using.

Is master-worker the default mode for HAProxy 2.9.7?

How would I go about checking if my HAProxy is using master-worker?

You can read more about handling haproxy process in the management guide here:

With systemd and master-worker mode you’d generally see (primary) haproxy process started with -W for master-worker mode and -Ws for systemd notify support.