MEDIUM: adjust the maxaccept per listener depending on the number of processes
global.tune.maxaccept was used for all listeners. This becomes really not
convenient when some listeners are bound to a single process and other ones
are bound to many processes.
Now we change the principle : we count the number of processes a listener
is bound to, and apply the maxaccept either entirely if there is a single
process, or divided by twice the number of processes in order to maintain
fairness.
The default limit has also been increased from 32 to 64 as it appeared that
on small machines, 32 was too low to achieve high connection rates.
diff --git a/src/listener.c b/src/listener.c
index 6781e58..7af9adc 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -252,7 +252,7 @@
{
struct listener *l = fdtab[fd].owner;
struct proxy *p = l->frontend;
- int max_accept = global.tune.maxaccept;
+ int max_accept = l->maxaccept;
int cfd;
int ret;