Follow-up · depth 6
Design a small subsystem that relies on Streams and Backpressure
Design a small subsystem that relies on Streams and Backpressure
Answers use simple, clear English.
Quick interview answer
Sketch components, data flow, failure modes, and metrics around Streams and Backpressure. Example shape: ETL job pipes HTTP download → gzip transform → S3 upload without loading entire file into RAM.
Detailed answer
Mini design using Streams and Backpressure: • Components: API edge, worker/queue, store, and observability. • Data flow: request → Streams and Backpressure-related path → response/async side effects. • Failure modes: timeouts, overload, partial dependency loss. • Metrics: latency, errors, saturation for the Streams and Backpressure path. Guardrails: Use pipeline() from stream/promises for automatic cleanup on error. Parent context: Baseline: Readable pushes data; Writable signals backpressure when internal buffer exceeds highWaterMark. Respect drain event before resuming writes to avoid memory blowup.
Full explanation
Interviewers want a crisp architecture story anchored on Streams and Backpressure, not a buzzword list. 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
Baseline: Readable pushes data; Writable signals backpressure when internal buffer exceeds highWaterMark. Respect drain event before resuming writes to avoid memory blowup.
View full parent question →