Node.js Streams: Readable, Writable, Transform, pipeline() and Backpressure
Node.js streams process data piece by piece; waiting for drain when write() returns false, which is respecting backpressure, keeps memory constant, and pipeline() wires that into every stage together with error handling. With real measurements: a producer that ignores false growing the heap to 182 MB, pipe() leaving the source file open, a 505 MB Bookstore order export streamed with 147 MB RSS, and the same job taking 993 MB in memory.
14 Nov 2026
·
14 min
·
13