Skip to content

feat: make node agent keep-alive settings configurable#648

Open
itsmeadi wants to merge 1 commit intomainfrom
feat/configurable-node-agent-options
Open

feat: make node agent keep-alive settings configurable#648
itsmeadi wants to merge 1 commit intomainfrom
feat/configurable-node-agent-options

Conversation

@itsmeadi
Copy link
Copy Markdown
Contributor

@itsmeadi itsmeadi commented May 6, 2026

Summary

  • add configurable Node agent options to ClientOptions (keepAliveMsecs, maxSockets, maxFreeSockets, scheduling, httpAgent, httpsAgent)
  • keep backward-compatible defaults by continuing to use keepAlive: true and keepAliveMsecs: 3000 when overrides are not provided
  • add unit tests verifying default behavior, custom option propagation, and custom agent injection

Test plan

  • STREAM_API_KEY=dummy STREAM_API_SECRET=dummy yarn mocha --require tsx/cjs --require dotenv/config test/unit/node/client_test.js
  • CI passes

Made with Cursor

Expose Node HTTP/HTTPS agent options in ClientOptions so integrators can tune keep-alive behavior and socket pool limits to reduce EMFILE risk under load.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Size Change: +9.61 kB (+8.78%) 🔍

Total Size: 119 kB

📦 View Changed
Filename Size Change
dist/js_min/getstream.js 38.6 kB +3.03 kB (+8.54%) 🔍
dist/js/getstream.js 80.5 kB +6.58 kB (+8.9%) 🔍

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant