Load Shedding
How and when to deliberately reject requests so the rest succeed. Priority-based shedding, queue management, the AWS framing.
Overview
Reject some requests so the rest succeed
Load shedding is the discipline of rejecting some requests so that others succeed. It feels wrong, because engineers want to serve every request.
The right reframe: serving 70% of requests successfully is much better than failing 100% because the system collapsed. A shed request gets a fast 503 (Service Unavailable) and can retry; a request stuck in a collapsing system gets nothing.
SRE Book Chapter 21, Handling Overload, is the canonical treatment: 'Avoid serving requests that you can't serve gracefully. The point of load shedding is to reduce the load on the server such that it can return to a healthy state and serve the rest of its load.'
Key concepts
- Load shedding
- Priority-based shedding
- Bounded queue
- Quarantine mode
- AWS shedding levels
- Adaptive concurrency limit
Interview questions
- Why is "serve all requests" worse than "drop some requests"?
- How would you implement priority-based shedding?
- What's the difference between rate limiting and load shedding?
Sign up free to read the full topic
More SRE topics
Start free on Cariara · Coding problems · System design studio