Follow-up · depth 9
How do you make Streams and Backpressure safer under partial failure?
How do you make Streams and Backpressure safer under partial failure?
Answers use simple, clear English.
Quick interview answer
Harden Streams and Backpressure with timeouts, retries with jitter, isolation, and graceful degradation. 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..
Detailed answer
Resilience for Streams and Backpressure under partial failure: • Timeouts + budgets on every dependency call • Retries only when idempotent, with jitter/backoff • Isolation: bulkheads/queues so one failure does not cascade • Degradation: serve stale/cached/limited mode when needed Practices: 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
Partial failure is the default in distributed systems — show how Streams and Backpressure stays useful anyway. 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 →