stackbook.io
🔍
← Back to Syllabus
Day 4Level 3 — Operating Reliably

Overload, Load Shedding, and Graceful Degradation

Learn: 30 minMap: 25 minDesign: 50 min

Core Concepts (5)

  • 1.Overload is the most common cause of cascading failure
  • 2.Queues hide overload until latency explodes
  • 3.Shed low-value work early to protect high-value work
  • 4.Backpressure pushes slowness back to the source
  • 5.Degraded service beats no service

Map to Your Experience

Think about a ticket sale or a big sale day. What would you want the site to drop first if it could not serve everyone?

Design Brief: Survive a Traffic Spike

Learn

Every system has a capacity, and demand sometimes exceeds it. What happens next defines your reliability. A system without overload protection tries to serve everyone, slows for everyone, times out for everyone, and then collapses as retries add more load. Serving fewer users well is almost always better than serving all users badly.

Queues are a trap here. A deep queue absorbs a burst and looks healthy, while the wait grows until responses arrive after clients gave up. The work is then done for nobody. Keep queues short, bound them, and drop or reject work that has already exceeded its deadline.

Load shedding means deliberately rejecting some requests to protect the rest. Do it early, ideally at the edge, because rejecting costs far less than starting and abandoning work. Decide by priority: payments in progress outrank browsing, and paying customers outrank anonymous crawlers. Return a fast 503 or 429 with a retry hint so well behaved clients back off.

Backpressure is the cooperative cousin. When a downstream component is saturated, it signals upstream to slow down, through blocking calls, bounded buffers, or explicit credit schemes, rather than accepting work it cannot finish. Combine it with admission control, such as a waiting room that lets a fixed number of users into the purchase flow at a time.

Graceful degradation reduces the work per request instead of the number of requests. Turn off recommendations, serve cached pages, skip analytics writes, or show approximate counts. Define the degradation ladder in advance with switches an operator can flip, and rehearse it, so that in a real surge the decisions are already made.

Map

List ten request types for a product you know. Rank them by business value and by cost to serve. Mark which would be shed first, which degraded, and which protected at all costs.

Design

Write the overload plan for the ticketing platform: priority classes, the shedding points with triggers, the waiting room design, and the ordered degradation ladder. State how you would test the plan before an on-sale. Keep your answer concrete: name real numbers, owners, and examples wherever you can, and note any assumption you had to make so a reviewer can challenge it.

Requirements

  • •Classify requests by priority
  • •Describe where and how load is shed
  • •List the features that degrade and in what order

Constraints

  • •Cannot add capacity in time
  • •Purchases must succeed for admitted users

Must Cover

priority-classesload-sheddingdegradation-planbackpressure

Trade-off Axis

fairness vs throughput

Competencies Advanced

reliability ops → L4economics evolution → L2

Ready to Design?

Open this day in the Design Studio. The studio follows this track: its days, concepts, patterns and trade-offs are loaded, and you keep one design across the whole track.

Open in Studio →