You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,6 +340,15 @@ This is intended for debugging purposes only and may change in the future withou
340
340
341
341
By default, this library uses a stable agent for all http/https requests to reuse TCP connections, eliminating many TCP & TLS handshakes and shaving around 100ms off most requests.
342
342
343
+
The SDK-created default agents cap both active and free sockets at 256 per protocol. Set `httpAgentMaxSockets` to tune that cap for the default agents only:
344
+
345
+
<!-- prettier-ignore -->
346
+
```ts
347
+
const runloop =newRunloopSDK({
348
+
httpAgentMaxSockets: 512,
349
+
});
350
+
```
351
+
343
352
If you would like to disable or customize this behavior, for example to use the API behind a proxy, you can pass an `httpAgent` which is used for all requests (be they http or https), for example:
When `httpAgent` is provided, `httpAgentMaxSockets` is ignored because the custom agent owns its socket policy.
368
+
358
369
### HTTP/2 transport
359
370
360
371
On Node.js, the SDK can send requests over HTTP/2, which multiplexes many concurrent requests over a small number of TLS connections instead of opening a connection per request. Enable it with the `http2` option:
0 commit comments