Skip to content

Commit c0f19bc

Browse files
authored
(DOCS-15619): Add --listenBacklog parameter to mongos reference (#2030) (#2037)
* (DOCS-15619): Add --listenBacklog parameter to mongos reference * create include file * convert to rst file
1 parent 3f5ebea commit c0f19bc

File tree

3 files changed

+46
-44
lines changed

3 files changed

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

source/reference/program/mongod.txt

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -349,49 +349,7 @@ Core Options
349349
- Set :option:`--bind_ip_all` to ``true``.
350350

351351

352-
.. option:: --listenBacklog <number>
353-
354-
*Default*: Target system ``SOMAXCONN`` constant
355-
356-
The maximum number of connections that can exist in the listen
357-
queue.
358-
359-
.. warning ::
360-
361-
Consult your local system's documentation to understand the
362-
limitations and configuration requirements before using this
363-
parameter.
364-
365-
.. important::
366-
367-
To prevent undefined behavior, specify a value for this
368-
parameter between ``1`` and the local system ``SOMAXCONN``
369-
constant.
370-
371-
The default value for the ``listenBacklog`` parameter is set at
372-
compile time to the target system ``SOMAXCONN`` constant.
373-
``SOMAXCONN`` is the maximum valid value that is documented for
374-
the *backlog* parameter to the *listen* system call.
375-
376-
Some systems may interpret ``SOMAXCONN`` symbolically, and others
377-
numerically. The actual *listen backlog* applied in practice may
378-
differ from any numeric interpretation of the ``SOMAXCONN`` constant
379-
or argument to ``--listenBacklog``, and may also be constrained by
380-
system settings like ``net.core.somaxconn`` on Linux.
381-
382-
Passing a value for the ``listenBacklog`` parameter that exceeds the
383-
``SOMAXCONN`` constant for the local system is, by the letter of the
384-
standards, undefined behavior. Higher values may be silently integer
385-
truncated, may be ignored, may cause unexpected resource
386-
consumption, or have other adverse consequences.
387-
388-
On systems with workloads that exhibit connection spikes, for which
389-
it is empirically known that the local system can honor higher
390-
values for the *backlog* parameter than the ``SOMAXCONN`` constant,
391-
setting the ``listenBacklog`` parameter to a higher value may reduce
392-
operation latency as observed by the client by reducing the number
393-
of connections which are forced into a backoff state.
394-
352+
.. include:: /includes/parameter-listenbacklog.rst
395353

396354

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

source/reference/program/mongos.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
.. contents:: On this page
1616
:local:
1717
:backlinks: none
18-
:depth: 1
18+
:depth: 2
1919
:class: singlecol
2020

2121
Synopsis
@@ -258,6 +258,8 @@ Core Options
258258
is, you can specify one or the other, but not both.
259259

260260

261+
.. include:: /includes/parameter-listenbacklog.rst
262+
261263

262264
.. option:: --maxConns <number>
263265

0 commit comments

Comments
 (0)