cloudpatterns.appClassroomKatasWhiteboardBlog
Resilience LineLesson

Load shedding — turning the excess away

Past its capacity, a server that tries to serve everyone slows for everyone until requests time out. Turning the excess away fast and cheaply keeps the accepted requests in time, so more orders succeed, not fewer — and starting a little before full keeps each one quick and the server off the edge.

12 minMediumStation: Load shedding

Members lesson

Membership isn’t open yet. The free lessons are open — 16 of them.

  1. Flaky payments
  2. Bulkhead
  3. Load shedding
  4. Backpressure
  5. Rate limiting
Resilience Line — where this lesson sits

What you'll be able to do

  1. 1Explain why quickly rejecting the excess keeps more requests succeeding than trying to serve them all.
  2. 2Predict goodput and latency for a server pushed past its capacity, with and without load shedding.
  3. 3Choose where to shed (gateway, load balancer or server), when to start, and which requests to turn away first.

Inside the lesson

steps
10
questions
8
simulations
3

You guess first, then run the system and see if you were right.

Step 1 · The setup

At the last stop, search's flooded server went down behind its wall. A bulkhead keeps a flood from spreading; it doesn't keep the flooded server up. This stop is about how a server protects itself.

Sale day again, for all of the shop server's traffic. It can take about 92 requests a second before it's past full; on a busy afternoon it gets 60, each answered in about 5 ms. At t = 10 a flash sale sends 150 a second. Autoscaling takes minutes to add servers — the rush arrives in seconds.

Steps 2–10 are for members