DOC: configuration: more details about the master-worker mode
Add more details about the master-worker mode in the "master-worker"
global keyword.
Should fix issue #2198.
(cherry picked from commit 419b79492a2ae8c9323b907b9d2da85c1208c372)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit ea62653f9b4a90f3841cfa8cfa9e07a5172c88f2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 6f07facf17ccfb26513a858fd5b32faf46bd24b7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 54d4957..8b69cf9 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -2004,10 +2004,18 @@
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.
+
+ This mode will launch a "master" which will fork a "worker" after reading the
+ configuration to process the traffic. The master is used as a process manager
+ which will monitor the "workers".
+
+ Using this mode, you can reload HAProxy directly by sending a SIGUSR2 signal
+ to the master. Reloading will ask the master to read the configuration again
+ and fork a new worker. The previous worker will be kept until the end of its
+ jobs.
+
+ The master-worker mode is compatible either with the foreground or daemon
+ mode.
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.