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: nodejs#34013
Refs: nodejs#33617
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
rickyes committed Sep 28, 2020
1 parent 6933e00 commit 0a507d1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/api/http.md
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 0a507d1

Please sign in to comment.