Skip to content

Commit eaedfaf

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

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
@@ -348,51 +348,7 @@ Core Options
348348
- Set :option:`--bind_ip_all` to ``true``.
349349

350350

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

397353

398354
.. 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
@@ -261,6 +261,8 @@ Core Options
261261
is, you can specify one or the other, but not both.
262262

263263

264+
.. include:: /includes/parameter-listenbacklog.rst
265+
264266

265267
.. option:: --maxConns <number>
266268

0 commit comments

Comments
 (0)