Node Underground
Dec 31, 2015 · Backend Development
When Does Node.js’s drain Event Fire? A Deep Dive into Stream Backpressure
This article investigates the conditions under which Node.js’s drain event is emitted, explores its relationship with socket.write’s return value and highWaterMark, demonstrates experiments with TCP and HTTP streams, and shows how to implement proper back‑pressure handling using pause/resume or pipe.
Backend DevelopmentNode.jsbackpressure
0 likes · 13 min read
