[erlang-questions] The optimal value of backlog

Jesper Louis Andersen <>
Mon Nov 22 19:39:04 CET 2010


On Mon, Nov 22, 2010 at 7:19 PM, info <> wrote:
> Yes.

The problem with backlog settings are that they depend a lot on the
nature of your application. The general rule of thumb is SOMAXCONN,
see

http://stackoverflow.com/questions/114874/socket-listen-backlog-parameter-how-to-determine-this-value

Also note that there are two queues. The listen backlog and the
SYN-queue backlog (inside the OS kernel). Both might need tuning - but
I am no Windows tuning expert. The difference is that the latter is
the limit on the SYN queue, while the former is the limit on fully
established connections (i.e., SYN -> SYN+ACK -> ACK)

For rather small amounts of incoming connections, it is possible that
the default of 5 is adequate.

For the linux users out there, read the latter half of the listen(2)
man page because it is slightly different than just throwing SOMAXCONN
out. Also read tcp(7).


-- 
J.


More information about the erlang-questions mailing list