Skip to content
SD-24 · NOTIFICATION SERVICE · INTERACTIVE

Break it.
Then fix it.

Launch a campaign, watch providers throttle you and one-time codes get stuck, and add the parts a real notification service needs. Every switch is a decision you would defend in an interview.

CHALLENGEDeliver 300K notifications/s with p99 under 5 s, no errors, codes ahead of marketing and no duplicates.
StatusDOWNAt 100K notifications per second
Delivery p9954.7 sTarget under 5 s
Code p9945 sStuck behind marketing
Errors83.3%Retries can send twice
Monthly cost$12,07072 workers
ProducersLIVE
100K notifications/s
traffic source
Load balancerOK
Autoscales API servers
spreading 100K/s
API servers × 15OK
Checks, then enqueues
100K / 150K req/s
Channel queuesCODES LATE
One lane for everything
100K messages/s
Workers × 72OK
Push, email, SMS
100K / 144K sends/s
ProvidersDOWN
One call per message
100K / 30K calls/s
User DBDOWN
Settings + device tokens
200K / 40K reads/s
Delivery logDOWN
3 status rows each
300K writes/s
Every notification reads the user database twice. Settings and device tokens are read 200K times a second. They change rarely, so cache them and clear the entry when a user changes them.
200 msPer provider callToo slow to wait for in the request, so a queue sits between the API and the providers.
100×Fewer provider callsBatching 100 messages a call turns 300,000 sends/s into 3,000 calls/s.
2 lanesCodes vs campaignsA login code should never wait behind 50 million marketing messages.
24 hDedupe windowA retried request with the same key is dropped, so nobody gets a message twice.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.