Skip to content

Commit eb6a71f

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

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

source/configuration.rst

+20-1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,25 @@ 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.
109+
110+
On Linux, FreeBSD, OpenBSD and macOS the default is **-1** which
111+
means use the OS default. For example. on Linux since 5.4, this is
112+
**4096** (previously **128**) and on FreeBSD it's **128**.
113+
114+
On other systems default is **511**.
115+
116+
NOTE: Whatever limit you set here will be limited by the OS
117+
system-wide sysctl. For example. on Linux that is
118+
**net.core.somaxconn** and on BSD it's **kern.ipc.somaxconn**
119+
120+
*(since 1.33.0)*
102121

103122
Here, a local listener accepts requests at port 8300
104123
and passes them to the **blogs** app
@@ -5662,4 +5681,4 @@ Example with njs and the use of a template literal:
56625681
"if": "`${uri == '/health' ? false : true}`",
56635682
"path": "..."
56645683
}
5665-
}
5684+
}

0 commit comments

Comments
 (0)