CodeZettaInterview Hub

Node.js · Streams · Junior · Concept

Explain backpressure in Node streams.

Short Interview Answer

When a writable cannot keep up, it signals the readable to pause — `write` returns false and 'drain' resumes.

Detailed Explanation

Ignoring backpressure causes unbounded memory growth. Prefer `pipeline`/`pipelinePromise` over manual pipe for error propagation. Interviewers love 'what happens if producer is faster than consumer?'

Did you know this answer?