SYSTEM Cited by 6 sources
Node.js¶
Node.js (nodejs.org) is the server-side JavaScript runtime built on Google's V8, originally released 2009. Outside the browser, it is the default runtime for JS/TS server workloads — API services, SSR, build tooling, CLI utilities.
Node.js ships both its own streaming API (stream.Readable /
stream.Writable / stream.Transform, predating the web
platform's) and the WHATWG Web
Streams API (adopted post-v15 via Readable.toWeb /
Writable.toWeb). Two parallel streaming stacks coexist; most
older Node code uses Node streams, newer frameworks targeting
cross-runtime portability use Web streams. The interface
between them is the
stream-adapter overhead
surface.
Governance¶
- Technical Steering Committee (TSC) — open-source project governance; James Snell (Cloudflare Workers engineer) + Matteo Collina (Platformatic CTO) + Robert Nagy are TSC members / contributors cited in Cloudflare's 2026-02-27 streams critique.
- OpenJS Foundation-hosted; permissive (MIT + BSD) licensing across core modules.
Relevance to streaming performance¶
Two independent 2025-2026 Cloudflare posts converge on Node.js streaming as a performance pain point:
- 2025-10-14 (sources/2025-10-14-cloudflare-unpacking-cloudflare-workers-cpu-performance-benchmarks)
— profiling OpenNext on Workers
surfaced a Node ⇆ Web stream double-buffer pattern
(
Readable.toWeb(Readable.from(chunks))) whose fix (ReadableStream.from(chunks)) shipped upstream. - 2026-02-27 (sources/2026-02-27-cloudflare-a-better-streams-api-is-possible-for-javascript)
— Snell's post-mortem on why Web streams performance is so
difficult to recover; Vercel's independent Node.js-Web-streams
benchmark
measured
pipeThrough()at 630 MB/s vs Nodepipeline()at ~7,900 MB/s = 12× gap, attributed almost entirely to promise and object allocation overhead.
Node.js has not yet invested significant effort in optimizing its Web streams implementation; Vercel's proposed "fast-webstreams" work promises ~10× gains by eliminating promises on certain code paths. Cited in the 2026-02 post: "as one of the core maintainers of Node.js, I am looking forward to helping Malte and the folks at Vercel get their proposed improvements landed!"
2026-04-21 update: fast-webstreams ships; PR #61807 merges¶
The fast-webstreams work is now real
(sources/2026-04-21-vercel-we-ralph-wiggumed-webstreams-to-make-them-10x-faster):
library on npm as experimental-fast-webstreams,
passing 1,100/1,116 WPT; two ideas landed upstream via
Node.js TSC member Matteo Collina's PR
nodejs/node#61807
— "stream: add fast paths for webstreams read and
pipeTo":
read()fast path — buffered reads return pre-resolved Promises directly without allocatingReadableStreamDefaultReadRequest. See concepts/synchronous-fast-path-streaming.pipeTo()batch reads — drain multiple reads from the controller queue without per-chunk request objects; backpressure preserved viadesiredSizecheck after each write.
Measured: ~17-20 % buffered-read improvement;
~11 % pipeTo improvement. Applies to every
Node.js user free. Canonical instance of
patterns/upstream-contribution-parallel-to-in-house-integration
at the streaming-runtime altitude: library + upstream
PR in parallel.
James Snell's tracking issue
nodejs/performance#134
enumerates remaining opportunities (C++-level piping
for internally-sourced streams, lazy buffering,
WritableStream adapter double-buffer elimination).
undici — Node's fetch implementation¶
Node.js's built-in fetch() uses undici, a first-party
HTTP/1.1 + HTTP/2 client. Unconsumed fetch() response bodies
(where code only checks response.ok and never reads /
cancels the body stream) have caused connection-pool
exhaustion under load — a real production bug fixed in
undici. The 2026-02 article cites this as a canonical example
of how the Web streams spec's complexity "makes dealing with
these types of issues [not] easy", even when the immediate
fault is an implementation bug.
Workers vs Node.js¶
Cloudflare Workers and Node.js both embed V8 but make different architectural choices:
| Axis | Node.js | Workers |
|---|---|---|
| Isolation | Process-level | V8 isolate (128 MB default) |
| Concurrency | One event loop per process | One isolate per request / reused across requests |
| I/O | libuv + Node bindings | Runtime-provided ABIs (KV, D1, DO, R2) |
| Streaming | Node streams + Web streams | Web streams-first (Node-streams absent by default) |
| Billing model | Wall-clock cost | CPU time (not wall-clock) |
Workers targeting Node.js
compatibility expose nodejs_compat to run unmodified Node
libraries; Cloudflare's 2026-01-29 Moltworker case study
measured that 15 of the top 1 000 NPM packages fail natively
on Workers after excluding build/CLI/browser-only — a 98.5 %
compatibility rate for production libraries.
Seen in¶
- sources/2026-04-21-vercel-bun-runtime-on-vercel-functions
— canonical wiki instance of Node.js as one runtime option on
a multi-runtime function platform. Vercel Functions exposes
Node.js (default) alongside Bun (public beta)
via
bunVersioninvercel.json. Vercel's profiling ofcf-vs-vercel-benchunder Node.js found "the main bottleneck in Node.js came from its Web Streams implementation and transform operations, where buffer scanning and data conversions added measurable CPU cost. Garbage collection also consumed a significant share of total processing time under heavy load." Switching to Bun yielded a 28 % TTLB reduction on CPU-bound Next.js rendering — see concepts/web-streams-as-ssr-bottleneck. Node.js remains positioned as default for compatibility + cold-start + ecosystem maturity; faster for cold starts ("mature and well-optimized"). - sources/2026-02-27-cloudflare-a-better-streams-api-is-possible-for-javascript
— Node.js as one of four target runtimes for the
new-streamsbenchmark; TSC members quoted; undici unconsumed-body bug cited; Vercel's fast-webstreams proposal for Node referenced. - sources/2025-10-14-cloudflare-unpacking-cloudflare-workers-cpu-performance-benchmarks
— Node-stream ⇆ Web-stream double-buffer adapter fix;
pipeThrough()Buffer allocation patches;JSON.parse(reviver)V8 improvement benefiting Node. - sources/2026-01-29-cloudflare-moltworker-self-hosted-ai-agent — Node.js compatibility in Workers measured at 98.5 % of top 1 000 NPM packages.
- sources/2026-04-21-vercel-we-ralph-wiggumed-webstreams-to-make-them-10x-faster
— canonical wiki instance of Node.js upstream +
userland library co-evolution for streaming perf.
Vercel ships systems/fast-webstreams (1,100/1,116
WPT passes) targeting Node's Web Streams; Matteo
Collina lands two ideas in PR #61807 delivering
~17-20 %/~11 % improvements natively. Also validates
stream.pipeline()as 7,900 MB/s reference implementation vs 630 MB/s native Web Streams — 12.5× gap on the same C++ backend. - sources/2026-04-22-cloudflare-making-rust-workers-reliable-panic-and-abort-recovery-in-wasm-bindgen — Node.js-as-Wasm-EH-laggard instance. Cloudflare backported modern WebAssembly Exception Handling to Node.js 22 and Node.js 24 to keep Node viable as a default target for wasm-bindgen. Without the backport, "the Node.js 24 LTS release schedule would have left the entire ecosystem stuck on legacy WebAssembly Exception Handling until April 2028." Modern EH landed natively in Node.js 25.0.0 (2025-10-15). Second wiki instance of Cloudflare contributing to Node.js itself (after the 2025-10 trig compile flag PR #60153); canonical upstream-the-fix at the Wasm-EH layer.
Related¶
- systems/v8-javascript-engine — the JS engine Node.js embeds.
- systems/web-streams-api — the WHATWG streaming API Node
adopted alongside its own
streammodule. - systems/new-streams — Snell's POC alternative streaming API, Node.js-compatible.
- systems/cloudflare-workers — the sibling V8-isolate runtime that shares V8 with Node but diverges on I/O / billing / concurrency.
- systems/opennext — the Next.js adapter layer whose Node-stream-layer fixes ship upstream to Node.
- concepts/promise-allocation-overhead — the dominant cost in Node's current Web streams implementation.
- concepts/stream-adapter-overhead — the Node ⇆ Web cost surface.
- systems/bun — alternative JS runtime now available alongside Node.js on Vercel Functions; 28 % TTLB win on CPU-bound Next.js SSR per 2026-04-21 Vercel profiling.
- systems/vercel-functions — the multi-runtime function platform exposing Node.js + Bun via config-axis selection.
- concepts/web-streams-as-ssr-bottleneck — the profiling finding Vercel + Cloudflare both disclosed at Node's Web-Streams layer.
- concepts/runtime-choice-per-workload — the four-axis trade-off Node.js sits on.
- patterns/multi-runtime-function-platform — the platform-design pattern Vercel operationalises with Node.js
- Bun.
- systems/fast-webstreams — userland reimplementation
of the Web Streams API on top of Node's
stream.*internals; upstream source for PR #61807. - systems/react-flight — React's byte-stream serialiser — dominant production workload Node's Web Streams implementation must serve.
- concepts/synchronous-fast-path-streaming — the specific optimisation landed in Node PR #61807.
- concepts/microtask-hop-cost — unavoidable scheduling cost the fast path cannot remove.
- patterns/upstream-contribution-parallel-to-in-house-integration — the library + upstream-PR model for rolling out streaming improvements.