mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
doc: Add maxTotalSockets option to agent constructor
PR-URL: https://github.com/nodejs/node/pull/34013 Backport-PR-URL: https://github.com/nodejs/node/pull/35396 Refs: https://github.com/nodejs/node/pull/33617 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/33617 Fixes: https://github.com/nodejs/node/issues/31942
This commit is contained in:
1 parent
3d1bdc254c
commit
1a8669d6ec
1 file changed
+8
@@ -112,6 +112,10 @@ http.get({
|
||||
### `new Agent([options])`
|
||||
<!-- YAML
|
||||
added: v0.3.4
|
||||
changes:
|
||||
- version: REPLACEME
|
||||
pr-url: https://github.com/nodejs/node/pull/33617
|
||||
description: Add `maxTotalSockets` option to agent constructor.
|
||||
-->
|
||||
|
||||
* `options` {Object} Set of configurable options to set on the agent.
|
||||
@@ -131,6 +135,10 @@ added: v0.3.4
|
||||
* `maxSockets` {number} Maximum number of sockets to allow per
|
||||
host. Each request will use a new socket until the maximum is reached.
|
||||
**Default:** `Infinity`.
|
||||
* `maxTotalSockets` {number} Maximum number of sockets allowed for
|
||||
all hosts in total. Each request will use a new socket
|
||||
until the maximum is reached.
|
||||
**Default:** `Infinity`.
|
||||
* `maxFreeSockets` {number} Maximum number of sockets to leave open
|
||||
in a free state. Only relevant if `keepAlive` is set to `true`.
|
||||
**Default:** `256`.
|
||||
|
||||
Reference in new issue
Block a user