HAProxy community

3 linked process for single HAProxy service


#1

Hi Guys,
Can somebody please explain me why I see 3 linked haproxy process for a single haproxy service.
As you can see all are interlinked to each other.

[root@anchorevlan-hou02p02-1178 haproxy]# ps -ef | grep haproxy
root 17653 1 0 07:24 ? 00:00:00 /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run haproxy.pid
haproxy 17654 17653 0 07:24 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
haproxy 17655 17654 0 07:24 ? 00:00:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds


#2

The first one with PID 17653 is not a haproxy instance, it’s a different executable, a wrapper to handle systemd on one side and the actual haproxy master process on the other. Fortunately 1.7 was the last release branch that needed this, both 1.8 and 1.9 stable releases removed this wrapper completely (as systemd handling was implemented in haproxy itself).

PID 17654 is the actual master process, required to handle the worker processes (passing sockets around while reloading, etc).

PID 17655 is the worker process actually handling traffic.


#3

Thanks for the information. That makes sense to me.