Follow-up · depth 2
What are common failure modes of Streams and Backpressure?
What are common failure modes of Streams and Backpressure?
Answers use simple, clear English.
Quick interview answer
Common failures around Streams and Backpressure: blocking the hot path, ignoring backpressure, and weak timeout/retry design. Ignoring write() return false; not awaiting 'drain' on backpressure.
Detailed answer
Failure modes for Streams and Backpressure: Known pitfalls: Ignoring write() return false; not awaiting 'drain' on backpressure. • Missing timeouts / unbounded retries • No backpressure when downstream slows • Assuming ordering/guarantees the runtime does not provide How seniors prevent them: Use pipeline() from stream/promises for automatic cleanup on error. Parent context: Use Streams and Backpressure as the core idea. Example shape: ETL job pipes HTTP download → gzip transform → S3 upload without loading entire file into RAM..
Full explanation
Name concrete failure modes and the mitigation for each — that scores higher than a vague “it can fail.” Readable pushes data; Writable signals backpressure when internal buffer exceeds highWaterMark. Respect drain event before resuming writes to avoid memory blowup.
Follow-up questions
Only answered follow-ups are shown — click to open with full answers
Parent context — Streams and Backpressure
Use Streams and Backpressure as the core idea. Example shape: ETL job pipes HTTP download → gzip transform → S3 upload without loading entire file into RAM..
View full parent question →