Design a notification system (a tap on the shoulder, 250 million times a day)
The Order Slip Rail · Open board
Slips going onto a rail and a cook taking them off at his own pace, which is the shape every channel queue in this lesson has.
Before you start. You need the six steps from Design the Whole Thing (the interview, assembled): ask, estimate, API, data, design, bottlenecks, with a number paying for every box. Four Systems in One Night (worked designs) showed that the biggest number in the prompt names the hinge of the design. The order slip rail (queues & the utilization cliff) gave you the queue, a line of jobs that lets the sender go home before the work is done. Charged Twice (idempotency & exactly-once) gave you the fact that a retry can do the work a second time, and Rate limiting: the token bucket gave you the rate limit.
Lesson 67 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
- 2008 to 2009: the courier Apple would not let you hire
- The first number: 2,894 a second, and a burst 23 times that
- Fan-out: one event becomes millions of letters
- A channel queue: one tray per courier
- Idempotency key: the same letter, sent twice
- Failover: when the courier’s van breaks down
- Delivery receipt: knowing it arrived
- 13 January 2018: a letter you cannot take back
- Step 1, requirements
- Step 2, targets
- Step 3, estimates that change the design
- Step 4, entities and API
- Step 5, storage, with the trade said plainly
- Step 6, the design, one requirement at a time
- Step 7, deep dives
- What each level adds
- The follow-up: send to all 50 million at 9:00 sharp
Terms it explains: fan-out, channel queue, idempotency key, failover, delivery receipts, Common mistakes, Notification, Delivery, Preference, Device, Receipt.
Review System Design
Saved in this browser, and to your account when you sign in.