A downstream service slows from 100ms to 2 seconds
A medium Pipeline Design mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Pipeline Design
- Difficulty
- medium
Interview Prompt
A downstream service slows from 100ms to 2 seconds. The pipeline's worker queue (currently unbounded) accepts every put() instantly. Memory grows without limit. The producer crashes when memory exhausts; the producer's upstream begins to fill its own queue, and the failure cascades backward. The section's mitigation: every queue between two components has a maximum size, and when full the producer blocks (backpressure). Load-shedding is a complement when blocking is unacceptable. Apply backpressure by renaming the unbounded queue to one with maxsize and blocking semantics, and add a load-shedding policy on the source side.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your pipeline design solution with real code execution
- Get instant feedback and a hire/no-hire decision