Black Friday: 30% off every plan through November 30. See the prices
SysDesignPrep.com
Study guide

Updated 24 October 2026

Load shedding and backpressure

Staying up when demand exceeds capacity: why overloaded systems collapse, backpressure in queues and streams, bounded buffers, load shedding by priority, adaptive concurrency limits, deadlines, brownouts and graceful degradation, and retry storms.

Reading is half of it. Now try it in an interview.An AI interviewer asks you to design Ticketmaster, out loud or typed, and scores the answer for your level. Or watch a sample interview first, free with no sign-up to start.
Start an AI mock

Try it yourself, in a playground:The circuit breaker patternExponential backoff and jitterQueueing and Little’s lawCache stampedeLoad sheddingAutoscalingBulkhead patternDeadline propagationRetry stormsPriority queuesAdaptive concurrency limits

Every system eventually receives more work than it can handle: a launch, a viral post, a failed region shifting traffic, a retry storm after an outage. Autoscaling helps, but it takes minutes, and some resources (a database primary) cannot scale quickly at all. What the system does in those minutes decides whether users see slightly degraded service or a total outage. Backpressure slows producers down; load shedding drops work deliberately. Both are signs of a mature design.

Why overload turns into collapse

Without protection, overload is self-reinforcing:

  1. Requests arrive faster than they are served; queues grow.
  2. Latency rises; clients time out, but the server keeps working on requests nobody is waiting for.
  3. Clients retry, adding more load.
  4. Memory fills with queued work; garbage collection and swapping slow everything further.
  5. Throughput of useful work drops toward zero, and the system stays down even after demand returns to normal.

Queueing theory explains the latency cliff near full utilisation. See queueing theory and capacity planning.

Backpressure

Backpressure propagates "slow down" upstream instead of buffering without limit:

  • Bounded queues: when full, producers block or get an error rather than adding more.
  • Pull-based consumption: consumers fetch work at their own pace (Kafka consumers, reactive streams) rather than having it pushed at them.
  • Flow control: TCP windows and HTTP/2 stream limits do this at the network level.
  • Explicit signals: return 429 Too Many Requests or 503 with Retry-After, so clients back off.

In streaming pipelines, backpressure lets a slow sink slow the whole pipeline instead of crashing a stage; the lag is visible and recovers later. See batch and stream processing.

Load shedding

When you cannot slow the source (users clicking, devices sending), reject some work early and cheaply so the rest succeeds:

  • Shed at the edge, before expensive work: the gateway or load balancer rejects when backends report overload.
  • Prioritise: keep checkout, login and paid traffic; shed analytics beacons, prefetches, background sync and bots first.
  • Reject new work, not in-flight work: finishing started requests is more valuable than starting new ones.
  • Prefer LIFO or deadline-aware queues under overload: the newest requests still have clients waiting; the oldest probably timed out.

Adaptive concurrency limits

Fixed limits are hard to set: too low wastes capacity, too high allows collapse. Adaptive limits (inspired by TCP congestion control) raise the allowed concurrency while latency stays near its baseline and cut it when latency rises. Requests beyond the limit are rejected immediately. Libraries implement this per service, so each protects itself without manual tuning.

Deadlines

Pass a deadline with every request (gRPC does this natively). Each service checks the remaining time before starting work and gives up if it cannot finish in time. Downstream calls inherit the shrinking budget. No work is wasted on requests the user has already abandoned. See tail latency.

Graceful degradation

Serve something useful with less work:

  • Return cached or slightly stale results instead of computing fresh ones. See caching.
  • Turn off expensive optional features (personalised ranking becomes popularity ranking; recommendations become a static list) with operational feature flags. See feature flags and A/B testing.
  • Reduce quality: lower video bitrate, fewer search results, smaller images.

Planned brownouts decide in advance which features degrade first.

Retry storms

Retries turn a small overload into a large one. Use:

  • Exponential backoff with jitter.
  • Retry budgets: retries limited to, say, 10 % of normal traffic.
  • Retry at one layer only.
  • Circuit breakers that stop calling a failing dependency for a while.

See rate limiting and resilience.

Queues for surges

For predictable spikes (a ticket sale opening), put users in a virtual waiting room and admit them at the rate the backend can handle, rather than letting everyone hit the system at once. Asynchronous work goes through queues that absorb bursts and are drained at a steady rate. See Design Ticketmaster and Design a Notification System.

In the interview

When asked "what happens if traffic spikes 10x?": autoscaling for the long term; for the first minutes, rate limits at the edge, priority-based shedding of non-critical traffic, adaptive concurrency limits per service, deadlines, cached and degraded responses, and backoff with retry budgets in clients. Mention a waiting room for planned spikes.

Checklist

  • Bounded queues everywhere; no unbounded buffering.
  • Backpressure via pull consumption and explicit 429 or 503 signals.
  • Priority-based shedding at the edge; finish in-flight work first.
  • Adaptive concurrency limits and propagated deadlines.
  • Planned degradation modes and operational flags.
  • Jittered backoff, retry budgets and circuit breakers.
  • Waiting rooms and queues for predictable surges.

Questions people ask

What is load shedding?

Load shedding is deliberately rejecting some work, early and cheaply, so the rest succeeds when demand exceeds capacity. It is the tool for when the source cannot be slowed, such as users clicking or devices sending. Shed at the edge before expensive work, keep checkout, login and paid traffic, drop analytics beacons, prefetches, background sync and bots first, and reject new work rather than requests already in flight.

What is backpressure?

Backpressure propagates a "slow down" signal upstream to producers instead of buffering work without limit. Bounded queues block producers or return an error when full, pull-based consumers such as Kafka consumers fetch work at their own pace, and services return 429 Too Many Requests or 503 with Retry-After so clients back off. In streaming pipelines, it lets a slow sink slow the whole pipeline instead of crashing a stage.

Load shedding vs backpressure: when do you use each?

Use backpressure when the producer can be slowed, and load shedding when it cannot. Backpressure fits pipelines and queues: a slow sink slows the whole pipeline, and the lag is visible and recovers later. Load shedding fits traffic that keeps arriving regardless, such as users clicking or devices sending, where rejecting low-priority work early keeps critical requests succeeding. Both matter in the first minutes of overload, because autoscaling takes minutes.

Why do overloaded systems collapse?

Overload is self-reinforcing: queues grow, latency rises, clients time out while the server keeps working on requests nobody is waiting for, and clients retry, adding more load. Memory fills with queued work, and garbage collection and swapping slow everything further. Throughput of useful work drops toward zero, and the system stays down even after demand returns to normal.

How do you prevent retry storms?

Use exponential backoff with jitter, retry budgets that limit retries to around 10 % of normal traffic, retries at one layer only, and circuit breakers that stop calling a failing dependency for a while. Retries turn a small overload into a large one. Propagated deadlines also help, because each service checks the remaining time before starting work and gives up on requests it cannot finish in time.

How do you handle a sudden 10x traffic spike?

Autoscaling handles the long term but takes minutes, so the first minutes depend on protection: rate limits at the edge, priority-based shedding of non-critical traffic, adaptive concurrency limits per service, deadlines, and cached or degraded responses. Clients back off with retry budgets. For planned spikes such as a ticket sale opening, a virtual waiting room admits users at the rate the backend can handle.