AdvancedTechnical
5 min
Designing Backpressure in Reactive Systems
Advertisement
Interview Question
In a streaming system under bursty load, how do you implement backpressure to prevent overload and cascading failures?
Key Points to Cover
- Use bounded queues and demand-driven pull (Reactive Streams semantics)
- Apply rate limiting, token buckets, and priority queues
- Shed load gracefully and return retry hints
- Instrument queue depths and processing latencies
Evaluation Rubric
Explains backpressure mechanisms clearly35% weight
Covers load shedding/graceful degradation25% weight
Monitors backlogs and latencies20% weight
Prevents cascades across services20% weight
Hints
- 💡Think demand propagation and bounded resources.
Common Pitfalls to Avoid
- ⚠️Ignoring or poorly implementing Reactive Streams publisher/subscriber contracts.
- ⚠️Using unbounded queues, which defer the problem and lead to OutOfMemory errors.
- ⚠️Lack of clear differentiation and prioritization for different data streams.
- ⚠️Aggressive or poorly designed load shedding that causes data loss without proper client notification.
- ⚠️Failure to implement intelligent retry mechanisms, leading to client starvation or re-triggering of overload.
Potential Follow-up Questions
- ❓How to test backpressure behaviors?
- ❓What about priority inversion risks?
Advertisement
Related Questions
Questions that share similar topics with this one
Cache Stampede / Thundering Herd
Intermediate🔧 Troubleshooting Scenarios•10 min•Scenario
HTTP Keep-Alive & Connection Pooling
Intermediate📞 Phone Screen•2 min•Phone
HTTP/1.1 vs HTTP/2
Intermediate📞 Phone Screen•2 min•Phone
K8s Readiness vs Liveness Probes
Intermediate📞 Phone Screen•2 min•Phone
CPU Load Average Explained
Intermediate📞 Phone Screen•2 min•Phone