Browse files

listen: increase the default backlog to 128

Increase the default listenq to 128 (the standard max for most systems).
Values exceeding the system limit are truncated to the system max. The
behaviour of 0 and negative numbers is system dependent.

UNP says about the backlog:

    Historically, sample code always shows a backlog of 5, as that was the
    maximum value supported by 4.2BSD. This was adequate in the 1980s when
    busy servers would handle only a few hundred connections per day. But with
    the growth of the World Wide Web (WWW), where busy servers handle millions
    of connections per day, this small number is completely inadequate. Busy
    HTTP servers must specify a much larger backlog, and newer kernels must
    support larger values.
  • Loading branch information...
1 parent 43a85fb commit dcf5f78c258d62fe3611e688d015c89b5005e6b8 @msantos committed Oct 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 include/procket.hrl
@@ -30,7 +30,7 @@
-define(UNIX_PATH_MAX, 108).
--define(BACKLOG, 50).
+-define(BACKLOG, 128).
-define(IFNAMSIZ, 16). % Max length of an interface device name including NULL

0 comments on commit dcf5f78

Please sign in to comment.