The Wire · Showcase
Undici kills idle-socket latency
By RepoJournal · Filed · About Node.js
Node's HTTP/1.1 keep-alive just got leaner, and native addon authors have a breaking change to plan for.
Undici's latest PR drops the timer floor on idle-socket validation, replacing it with a ref'd setImmediate to cut the ~1.3 to 1.5ms latency that dominated loopback and low-RTT workloads [1]. This split from #5701 keeps the response-queue poisoning validation intact, so you don't lose security for speed [1]. Separately, node-addon-api is bumping its minimum supported Node.js version to 22, a deliberate breaking change that will require CI and dependency updates across the ecosystem [2]. On the Node core side, a subtle fix ensures same-priority platform tasks now run in posting order, not the arbitrary order a binary heap can produce [3], and QUIC streams with active consumers will no longer be destroyed prematurely [4]. The Windows build gets a boost with new PGO workload scripts that turn optimization into a three-step process [5]. "Bump minimum supported Node.js version to 22" is the headline for native module maintainers, who must prepare for the floor to rise [6]. Action now: pull the Undici update for latency gains, schedule the addon-api migration, and keep an eye on the QUIC fix if you run HTTP/3.
One email a day. Unsubscribe in one click.
Keep up with Node.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Upgrade undici to include the idle-socket setImmediate fix nodejs/undici [immediate]
- → Test native addons against Node.js 22 minimum nodejs/node-addon-api [plan]
- → Review QUIC stream handling if you rely on onheaders or ontrailers nodejs/node [monitor]
References
- [1] perf(h1): drop idle-socket timer floor with a ref'd setImmediate ↗ nodejs/undici
- [2] feat!: bump minimum supported Node.js version to 22 (#1751) nodejs/node-addon-api
- [3] src: run same-priority platform tasks in posting order ↗ nodejs/node
- [4] quic: do not destroy incoming streams that have a consumer ↗ nodejs/node
- [5] build,win: add PGO workload scripts ↗ nodejs/node
- [6] feat!: bump minimum supported Node.js version to 22 ↗ nodejs/node-addon-api