Continue where you left off ×
The stall, built: rush hour (load testing, p99 and the knee in Go)
The Order Slip Rail · Open board
The rail of slips over the stove, and the chart where the wait leaves the ground as the stove gets busy. This lesson draws that chart again, from a real program, by sending it a crowd and timing every cup.
Before you start. The stall, built: copies and shards (replication and sharding in Go) finished the stall’s back room: a copy of the book that runs a few milliseconds behind, and the book cut into three by a hash. The front of the stall is still the one from The stall, built: one counter in code (load balancing, health checks and caching in Go) : three stalls, each cooking one cup at a time, and a gate that sends each customer to the least busy one. Thirty stalls on one order (availability, the nines, and the tail at scale) said the number that matters is how slow the unlucky customers are, not the average one, and that an order split across many stalls meets its unluckiest stall far more often. The stall that turns people away (load shedding and admission control) showed that when orders arrive faster than the stoves cook, the line grows without end. This lesson measures both on the stall you built.
The idea in 30 seconds
A load generator that waits for each answer before sending the next goes quiet whenever the server stalls, so it records almost none of the slow moments. This is coordinated omission.
A fair load generator sends on a fixed schedule and times each request from when it was due, so a stall is charged to every request that should have been sent during it.
p50 is the middle request’s time and p99 is the time only one request in a hundred exceeds. The p99 is what the unlucky users feel.
Response time stays flat as load rises, then bends sharply near full use. Here the bend, the knee, came around 80% of the servers’ capacity on paper.
Losing one of three servers at 60% load leaves two at 90%, past the knee: nothing fails after the first moments, and the slow requests get twenty times slower.
Read the story
Lesson 43 of 115 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson November 2014: the load generator that looked away The stall on paper: 1,500 cups a second A crowd on a schedule: the load generator The middle customer and the unlucky one: p50 and p99 The knee: where the wait leaves the ground The stove stops for 200 ms: coordinated omission A stall shuts, and the other two are suddenly 90% busy Terms it explains: coordinated omission, load generator, p50, p99, knee.
Review System Design
Mark as read Saved in this browser, and to your account when you sign in.