From 1a8669d6ec3cd9bc82abacdb0f7cbecae1ea88b2 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 Backport-PR-URL: https://github.com/nodejs/node/pull/35396 Refs: https://github.com/nodejs/node/pull/33617 Reviewed-By: Robert Nagy Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/33617 Fixes: https://github.com/nodejs/node/issues/31942 --- 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`.