Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 03 · System Design · Holding up under load · about 18 min to read

Watch: Queues: the order slip rail and the cliff
▶ VideoPlay it as a journeyTutor comes with a plan

The stall that turns people away (load shedding and admission control)

The Order Slip Rail
The Order Slip Rail · Open board

The stall, the wire of slips over the stove, and the cliff the wait falls off as the stove gets busy. This lesson picks up where the order slip rail lesson stopped, at “kitchen full, come back at five”, and shows why saying it early keeps the stall alive. The lab at the end of the story gives the rail a cap you can set yourself.

Before you start. You need The order slip rail (queues & the utilization cliff): orders go on a wire as paper slips, one stove cooks them in turn, and the wait takes off as the stove nears 100% busy, because a queue smooths bursts but cannot fix a stove slower than the day. It helps to have read Rate limiting: the token bucket, where a refused customer learns to wait a little longer each time before trying again.

Lesson 14 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 plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 2016: Google writes down “no credit for late assignments”
  • Back at the stall: 48 orders an hour, 40 cups, and a queue with no end
  • Cooking for nobody: the deadline, and work that is wasted
  • “Kitchen full”: load shedding, with a bounded queue
  • Not every order is equal: shed the sample cups first
  • The newest slip first: LIFO when the rail is already long
  • The customers who come straight back: the retry storm

Terms it explains: deadline, bounded queue, load shedding, priority, newest, LIFO, retry storm, admission control.

Lab

The kitchen is 95% busy. How much longer do you wait than at 50%?

Drag How busy the kitchen runs to 99%, then set Turn orders away to 10 slips and watch the wait fall.

Open The order slip rail

Related papers

Review System Design