Skip to content

Commit

Permalink
doc: Add maxTotalSockets option to agent constructor
Browse files Browse the repository at this point in the history
PR-URL: #34013
Backport-PR-URL: #35396
Refs: #33617
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: James M Snell <[email protected]>

PR-URL: #33617
Fixes: #31942
  • Loading branch information
rickyes authored and addaleax committed Sep 28, 2020
1 parent 3d1bdc2 commit 1a8669d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`.
Expand Down

0 comments on commit 1a8669d

Please sign in to comment.