Multi-process is deprecated so master-worker with 1 child only?

What is the recommended way to use master-worker (for seamless upgrades)?

master-worker “It is recommended to use this mode with multiprocess and

nbproc " This directive is deprecated and scheduled for removal in 2.5"

So is it correct to say that we now should use master-worker with a single child → Worker#1 (…using nbthread)?

yes you are correct, you should use nbthread now. By the way, HAProxy will automatically create one thread per CPU core available on your system.

Where did you see this mention of nbproc for master-worker? We may have to fix it :slight_smile:

This link (it doesn’t mention nbproc but I assumed that’s what “multiprocess” means):

master-worker [no-exit-on-failure]

Master-worker mode. It is equivalent to the command line “-W” argument. This mode will launch a “master” which will monitor the “workers”. Using this mode, you can reload HAProxy directly by sending a SIGUSR2 signal to the master. The master-worker mode is compatible either with the foreground or daemon mode. It is recommended to use this mode with multiprocess and systemd. By default, if a worker exits with a bad return code, in the case of a segfault for example, all workers will be killed, and the master will leave. It is convenient to combine this behavior with Restart=on-failure in a systemd unit file in order to relaunch the whole process. If you don’t want this behavior, you must use the keyword “no-exit-on-failure”. See also “-W” in the management guide.

ok, this is the 2.4 doc.
In 2.5, master-worker does not mention “multiprocess” anymore :slight_smile:

well, while you’re in 2.4, you should take the opportunity to switch from nbproc to nbthread, so you could upgrade to 2.5+ seamlessly later.

Thanks. I found one final reference to “multi-process” in 2.6/snapshot manual

In multi-process mode, it is divided by twice the number of processes