Skip to content

Commit 6dd5739

Browse files
authored
(DOCS-15619): Add --listenBacklog parameter to mongos reference (#2030) (#2039)
* (DOCS-15619): Add --listenBacklog parameter to mongos reference * create include file * convert to rst file
1 parent 79f7bc3 commit 6dd5739

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
@@ -310,51 +310,7 @@ Core Options
310310
- Set :option:`--bind_ip_all` to ``true``.
311311

312312

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

359315

360316
.. 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
@@ -254,6 +254,8 @@ Core Options
254254
is, you can specify one or the other, but not both.
255255

256256

257+
.. include:: /includes/parameter-listenbacklog.rst
258+
257259

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

0 commit comments

Comments
 (0)