Follow-up · depth 3
How would you debug production issues related to Streams and Backpressure?
How would you debug production issues related to Streams and Backpressure?
Answers use simple, clear English.
Quick interview answer
Debug Streams and Backpressure by confirming blast radius, checking lag/error metrics, grabbing profiles/traces, then mitigating before deep root-cause. Baseline: Readable pushes data; Writable signals backpressure when internal buffer exceeds highWaterMark. Respect drain event before resuming writes to avoid memory blowup.
Detailed answer
Production debug playbook for Streams and Backpressure: 1) Stabilize: rate-limit, shed load, or roll back if users are hurting. 2) Orient: dashboards for latency, errors, saturation tied to Streams and Backpressure. 3) Evidence: traces, profiles, logs with correlation IDs. 4) Hypothesize + prove with a safe experiment. 5) Fix + add a regression test/alert so it cannot silently return. Watch for: Ignoring write() return false; not awaiting 'drain' on backpressure. 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 score structured incident thinking: mitigate → measure → root cause → prevent. 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 →