Skip to content

Commit 649b28b

Browse files
authored
(DOCS-15619): Add --listenBacklog parameter to mongos reference (#2030) (#2040)
* (DOCS-15619): Add --listenBacklog parameter to mongos reference * create include file * convert to rst file
1 parent 7316b37 commit 649b28b

File tree

3 files changed

+48
-46
lines changed

3 files changed

+48
-46
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. option:: --listenBacklog <number>
2+
3+
*Default*: Target system ``SOMAXCONN`` constant
4+
5+
.. versionadded:: 3.6
6+
7+
The maximum number of connections that can exist in the listen
8+
queue.
9+
10+
.. warning ::
11+
12+
Consult your local system's documentation to understand the
13+
limitations and configuration requirements before using this
14+
parameter.
15+
16+
.. important::
17+
18+
To prevent undefined behavior, specify a value for this
19+
parameter between ``1`` and the local system ``SOMAXCONN``
20+
constant.
21+
22+
The default value for the ``listenBacklog`` parameter is set at
23+
compile time to the target system ``SOMAXCONN`` constant.
24+
``SOMAXCONN`` is the maximum valid value that is documented for
25+
the *backlog* parameter to the *listen* system call.
26+
27+
Some systems may interpret ``SOMAXCONN`` symbolically, and others
28+
numerically. The actual *listen backlog* applied in practice may
29+
differ from any numeric interpretation of the ``SOMAXCONN`` constant
30+
or argument to ``--listenBacklog``, and may also be constrained by
31+
system settings like ``net.core.somaxconn`` on Linux.
32+
33+
Passing a value for the ``listenBacklog`` parameter that exceeds the
34+
``SOMAXCONN`` constant for the local system is, by the letter of the
35+
standards, undefined behavior. Higher values may be silently integer
36+
truncated, may be ignored, may cause unexpected resource
37+
consumption, or have other adverse consequences.
38+
39+
On systems with workloads that exhibit connection spikes, for which
40+
it is empirically known that the local system can honor higher
41+
values for the *backlog* parameter than the ``SOMAXCONN`` constant,
42+
setting the ``listenBacklog`` parameter to a higher value may reduce
43+
operation latency as observed by the client by reducing the number
44+
of connections which are forced into a backoff state.

source/reference/program/mongod.txt

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -308,51 +308,7 @@ Core Options
308308
- Set :option:`--bind_ip_all` to ``true``.
309309

310310

311-
.. option:: --listenBacklog <number>
312-
313-
*Default*: Target system ``SOMAXCONN`` constant
314-
315-
.. versionadded:: 3.6
316-
317-
The maximum number of connections that can exist in the listen
318-
queue.
319-
320-
.. warning ::
321-
322-
Consult your local system's documentation to understand the
323-
limitations and configuration requirements before using this
324-
parameter.
325-
326-
.. important::
327-
328-
To prevent undefined behavior, specify a value for this
329-
parameter between ``1`` and the local system ``SOMAXCONN``
330-
constant.
331-
332-
The default value for the ``listenBacklog`` parameter is set at
333-
compile time to the target system ``SOMAXCONN`` constant.
334-
``SOMAXCONN`` is the maximum valid value that is documented for
335-
the *backlog* parameter to the *listen* system call.
336-
337-
Some systems may interpret ``SOMAXCONN`` symbolically, and others
338-
numerically. The actual *listen backlog* applied in practice may
339-
differ from any numeric interpretation of the ``SOMAXCONN`` constant
340-
or argument to ``--listenBacklog``, and may also be constrained by
341-
system settings like ``net.core.somaxconn`` on Linux.
342-
343-
Passing a value for the ``listenBacklog`` parameter that exceeds the
344-
``SOMAXCONN`` constant for the local system is, by the letter of the
345-
standards, undefined behavior. Higher values may be silently integer
346-
truncated, may be ignored, may cause unexpected resource
347-
consumption, or have other adverse consequences.
348-
349-
On systems with workloads that exhibit connection spikes, for which
350-
it is empirically known that the local system can honor higher
351-
values for the *backlog* parameter than the ``SOMAXCONN`` constant,
352-
setting the ``listenBacklog`` parameter to a higher value may reduce
353-
operation latency as observed by the client by reducing the number
354-
of connections which are forced into a backoff state.
355-
311+
.. include:: /includes/parameter-listenbacklog.rst
356312

357313

358314
.. option:: --maxConns <number>

source/reference/program/mongos.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.. contents:: On this page
1010
:local:
1111
:backlinks: none
12-
:depth: 1
12+
:depth: 2
1313
:class: singlecol
1414

1515
Synopsis
@@ -253,6 +253,8 @@ Core Options
253253
is, you can specify one or the other, but not both.
254254

255255

256+
.. include:: /includes/parameter-listenbacklog.rst
257+
256258

257259
.. option:: --maxConns <number>
258260

0 commit comments

Comments
 (0)