]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: fix maxaccept computation according to the frontend process range
authorCyril Bonté <cyril.bonte@free.fr>
Fri, 15 Apr 2016 05:58:43 +0000 (07:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Apr 2016 06:22:52 +0000 (08:22 +0200)
commit4920d70fa0faf41679631e2d2b18ee0fc4b8955e
treed4304019c1072db3177e4ea3ec9181802748ee0f
parentd6c06d0f65b356bb586f38b41305ccf42d2aedde
BUG/MINOR: fix maxaccept computation according to the frontend process range

commit 7c0ffd23 is only considering the explicit use of the "process" keyword
on the listeners. But at this step, if it's not defined in the configuration,
the listener bind_proc mask is set to 0. As a result, the code will compute
the maxaccept value based on only 1 process, which is not always true.

For example :
  global
    nbproc 4

  frontend test
    bind-process 1-2
    bind :80

Here, the maxaccept value for the "test" frontend was set to the global
tune.maxaccept value (default to 64), whereas it should consider 2 processes
will accept connections. As of the documentation, the value should be divided
by twice the number of processes the listener is bound to.

To fix this, we can consider that if no mask is set to the listener, we take
the frontend mask.

This is not critical but it can introduce unfairness distribution of the
incoming connections across the processes.

It should be backported to the same branches as commit 7c0ffd23 (1.6 and 1.5
were in the scope).
src/cfgparse.c