Skip to content

Commit 76e4694

Browse files
authored
(DOCS-15619): Add --listenBacklog parameter to mongos reference (#2030)
* (DOCS-15619): Add --listenBacklog parameter to mongos reference * create include file * convert to rst file
1 parent f66e445 commit 76e4694

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
@@ -353,49 +353,7 @@ Core Options
353353
- Set :option:`--bind_ip_all` to ``true``.
354354

355355

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

400358

401359
.. 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)