Streams and memory
Node.js Stream Backpressure
Visualize readable streams, writable streams, chunks, pipe, backpressure, and memory difference between full reads and streaming.
Backpressure means the writable side cannot keep up, so the readable side must pause or slow down instead of buffering unlimited data in memory.
Why this matters
Large file reads, uploads, downloads, transforms, CSV imports, and proxy responses can grow memory or hang when backpressure is ignored.
What the visualizer proves
Chunks move from readable to writable. When writes are slow, the queue grows unless the code respects drain or uses pipe/pipeline.
Real fix pattern
Use pipe or pipeline, handle error and close paths, and avoid reading entire large files into memory when streaming is possible.
Practice this topic
Start with the strongest case, then continue through related examples.