Architecture
Design Back Pressure
Back pressure propagates overload signals upstream to prevent cascading failures. When a downstream service is overloaded, upstream services reduce their request rate rather than overwhelming the system.
- Problem â Overload causes cascading failures
- Solution â Signal propagation to reduce load
- Goal â System operates at sustainable throughput
Back pressure is the immune system of distributed architectures: it detects overload and triggers protective responses.
What Is Back Pressure?
Back Pressure Mechanisms
Strategies
1. Queue-Based Back Pressure
2. Rate Limiting
3. Adaptive Load Shedding
4. Timeout-Based Back Pressure
Health Check Signals
| Signal | Threshold | Action |
|---|---|---|
| CPU > 80% | High | Reduce request rate |
| Memory > 85% | Critical | Shed load aggressively |
| Latency P99 > 500ms | Warning | Queue and slow down |
| Error rate > 5% | Critical | Circuit breaker open |
Reactive Streams
Practice Exercises
- Design: Implement back pressure for a microservice with 3 downstream dependencies at different capacities.
- Monitoring: Design a health check system that detects overload in < 5 seconds.
- Priority: Design priority-based load shedding where payment requests are never shed.
- Recovery: How do you gracefully resume normal load after back pressure is triggered?
What to Learn Next
-> Circuit Breaker Preventing cascade failures.
-> Retry Patterns Resilient retry mechanisms.
-> Idempotency Handling duplicate requests.
-> Saga Pattern Distributed transactions.
-> Load Balancing Distribution algorithms.
-> Design Netflix Resilient microservices.