The Wire · Showcase
HTTP2 CUTS OVERHEAD 30 PERCENT ACROSS HOT PATH
By RepoJournal · Filed · About Node.js
Node core just shipped a series of performance wins that strip per-request allocations from HTTP2, skipping unnecessary trailers round trips and eliminating object clones on every respond() call.
Three surgical http2 optimizations landed overnight that compound into meaningful throughput gains [1] [2] [3]. The first kills redundant EventEmitter tracking on stream listeners by overriding methods directly instead of subscribing to newListener events. The second eliminates a wasted DATA frame and C++ callback on every response that never registers trailers, which is most of them. The third removes object cloning from respond() and consolidates header lookups into a single pass. Together these cut hot-path allocations without touching the API surface. On the test_runner front, you're now getting entryFile reported in TestStream events [4], closing a gap for test harness integrations that need to trace which file kicked off a given test. A reliability fix landed that prevents worker stack size tests from flaking under tier-up churn [5]. On the website desk, the Undici docs are back to the stock Node logo [6] [7].
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
- → Benchmark your http2 server against the latest build - these changes compound on sustained load nodejs/node [plan]
- → Update test harness integrations to consume entryFile from TestStream events nodejs/node [plan]
References
- [1] http2: reduce per-request allocations nodejs/node
- [2] http2: skip trailers round trip for compat responses nodejs/node
- [3] http2: avoid copying the options in respond() nodejs/node
- [4] test_runner: report `entryFile` in `TestStream` events ↗ nodejs/node
- [5] test: remove impact of tier-up changes in worker stack size test nodejs/node
- [6] restore default node.js logo ↗ nodejs/undici-website
- [7] restore default node.js logo (#15) nodejs/undici-website