From 0a507d17cb6fbaecb875e2e7babd2bc78f65828b Mon Sep 17 00:00:00 2001 From: rickyes Date: Mon, 22 Jun 2020 21:15:34 +0800 Subject: [PATCH] doc: Add maxTotalSockets option to agent constructor PR-URL: https://github.com/nodejs/node/pull/34013 Refs: https://github.com/nodejs/node/pull/33617 Reviewed-By: Robert Nagy Reviewed-By: James M Snell --- doc/api/http.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index 88949e697f7b83..a3adbe36868bea 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -112,6 +112,10 @@ http.get({ ### `new Agent([options])` * `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`.