Skip to content

Commit 1987476

Browse files
committed
Add documentation for new 'backlog' config option
Signed-off-by: Andrew Clayton <[email protected]>
1 parent c7b6360 commit 1987476

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

source/configuration.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ Available listener options:
9999
defines SSL/TLS
100100
:ref:`settings <configuration-listeners-ssl>`.
101101

102+
* - **backlog**
103+
- Integer;
104+
controls the 'backlog' parameter to the listen(2) system-call.
105+
This essentially limits the number of pending connections waiting
106+
to be accepted.
107+
108+
The default varies by system. On Linux, FreeBSD, OpenBSD and macOS
109+
we default (-1) to the OS's default. E.g. on Linux since 5.4 this is
110+
4096, on FreeBSD it's 128.
111+
112+
On other systems we default to 511.
113+
114+
NOTE: Whatever limit you set here will be limited by the OS's
115+
system-wide sysctl, e.g. on Linux net.core.somaxconn and on BSD
116+
kern.ipc.somaxconn
102117

103118
Here, a local listener accepts requests at port 8300
104119
and passes them to the **blogs** app
@@ -5662,4 +5677,4 @@ Example with njs and the use of a template literal:
56625677
"if": "`${uri == '/health' ? false : true}`",
56635678
"path": "..."
56645679
}
5665-
}
5680+
}

0 commit comments

Comments
 (0)