Index

Module 03 · System DesignHolding up under load

Watch: Rate limiting: the bouncer at the door →▶ Watch the video

The bouncer at the door (rate limiting)

The Bouncer at the Door
The Bouncer at the Door · Open board

The stall finally gets someone on the door. A practical break from the consistency theory of Splitting the ledger (sharding) and The cut phone line (CAP, done properly), and it pays that theory back at the end.

Before you start. You need one fact about a server: it finishes a fixed amount of work per second, and a request is one job handed to it. And one about networks: one clerk asking another “what is the count now?” and waiting for the answer is a round trip. Counting in your own head takes microseconds; waiting for that answer takes milliseconds, and across the world most of a second.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

The limit is 5 a minute. How many can one client land in a two-second span?

Stay on Reset on the minute, press Next request until the list passes the rollover, and watch What the bouncer is counting.

Open The bouncer at the door →

Review System Design →

Saved in this browser, and to your account when you sign in.