I could have sworn that there was a patch which changed "listen(sd,512)" to
"listen(sd,5)" in http_main.c. But I just came across it in 0.8.14. Anyway,
whether there was a patch or not, it got me thinking.
The second parameter to listen() is the "backlog". i.e. how many pending
connections are allowed on this port before "connection refused" is returned
to the client. Now, the question is, is this the backlog for _all_ processes,
or is it a per process backlog? Or does it vary according to the system?
If it is per process, then a standalone server would work best with it set to
1 or 0 (depending on meaning). Is it worth making it settable? If we do, can
anyone measure the improvement?
BTW, the original reason for the patch, I thought, was that most systems
silently limit backlog to 5. Some system was not being so silent.
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435
Freelance Consultant Fax: +44 (181) 994 6472
and Technical Director Email: ben@algroup.co.uk
A.L. Digital Ltd,
London, England.
"listen(sd,5)" in http_main.c. But I just came across it in 0.8.14. Anyway,
whether there was a patch or not, it got me thinking.
The second parameter to listen() is the "backlog". i.e. how many pending
connections are allowed on this port before "connection refused" is returned
to the client. Now, the question is, is this the backlog for _all_ processes,
or is it a per process backlog? Or does it vary according to the system?
If it is per process, then a standalone server would work best with it set to
1 or 0 (depending on meaning). Is it worth making it settable? If we do, can
anyone measure the improvement?
BTW, the original reason for the patch, I thought, was that most systems
silently limit backlog to 5. Some system was not being so silent.
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435
Freelance Consultant Fax: +44 (181) 994 6472
and Technical Director Email: ben@algroup.co.uk
A.L. Digital Ltd,
London, England.