Skip to main content
Pattern

Load shedding

Problem

Your system is overloaded. Continuing to accept work makes it worse (all requests get slow, none complete on time).

Context

Traffic surge, downstream failure, capacity exhaustion.

Solution

Drop low-priority work when the system is overloaded. Categorize requests by priority. Under load, return 503 to low-priority tiers; keep serving high-priority. Better a few users see errors than everyone sees timeouts.

Trade-offs

  • Some users get explicit rejection
  • Priority categorization requires app-level work
  • Recovery: at what point do you stop shedding?

Failure modes

  • Load shedding threshold is wrong → shedding too much or too little
  • All requests are equal priority → shedding is random
  • No graceful shed → hard cut causes retry storm

When to use

  • Systems that will inevitably be overloaded and need graceful degradation
  • Multi-tier services (free vs premium users)
  • Public APIs facing DDoS

When NOT to use

  • All requests are equally important
  • Bounded traffic — capacity plan instead