Skip to content
SD-18 · CALENDAR SERVICE · INTERACTIVE

Break it.
Then fix it.

Grow the number of daily users and watch views, saves, reminders and device polling break one after another. Every switch is a decision from the write-up.

CHALLENGEServe 50 million daily users with view p99 under 200 ms, save p99 under 500 ms and no errors.
StatusDOWNAt 10M daily users
View p99999+ msTarget under 200 ms
Save p99963 msFan-out after the save
Errors89.4%25 calendar servers
AppsLIVE
7.0K views · 700 saves/s
67K polls/s
API gatewayOK
Autoscales calendar servers
spreading 75K/s
Calendar servers × 25HOT
Expands rules per view
75K / 100K req/s
DatabaseDOWN
Events, rules on read
114K reads · 2.8K writes/s
Change logOK
Fan-out after the save
700 changes/s
Devices are polling for nothing. 67K polls a second, more than all views, and nearly all find no change. Wake only devices whose calendar changed and sync by token.
10 : 1Views to savesPrecompute instances on write so every view is one range read.
29K/sReminders at :50Meetings start on the hour, so reminders bunch up 10 times.
333K/sPolls avoided100 million devices every 5 minutes, replaced by pushes to changed ones.
1 rowPer seriesThe repeat rule is the truth; the instance index can always be rebuilt.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.