flowing and paused modes
The two ways a Readable stream delivers data: in flowing mode it pushes chunks as fast as they arrive, in paused mode the consumer pulls them.
In more detail
A new stream starts paused, with readableFlowing set to null. Adding a data listener or calling resume() or pipe() switches it to flowing; pause() switches it back.
Related terms
- Readable stream — A Node.js stream you read data from, such as a file being read, an incoming HTTP request or a socket.
- async iteration — Looping over values that arrive over time with for await (const x of source), waiting for each one before the next turn of the loop.
- backpressure — A slow consumer signalling a fast producer to pause, so data does not pile up in memory faster than it can be handled.
Taught in
- Stream Mechanics: Readable Streams & Flowing Modes — Node.js Internals & Backend Services
- Backpressure Engineering: Handling Mismatched I/O — Node.js Internals & Backend Services