Skip to content
SD-30 · PRICE ALERTS · INTERACTIVE

Break it.
Then fix it.

Turn up the price changes, watch what melts, and add the parts a real alert service needs. Every switch is a decision you would defend in an interview.

CHALLENGEMatch 50K price changes/s with alerts out in under 60 s, nothing dropped and no repeat alerts.
StatusSTRAINEDAt 20K price changes per second
Alert delay65 sTarget under 60 s
Alerts lost0%Users get repeats
Monthly cost$2,4003 database nodes
Pricing serviceLIVE
20K changes/s · 4.0K alerts/s
traffic source
Matchers × 15HOT
Match and send inline
71% busy
Alert DBDOWN
Range read by product + price
20K lookups/s
ShoppersSPAM
Same alert again and again
4.0K alerts/s
One alert database can’t take the lookups. 20K range reads a second is past what one database takes. Split alerts into 8 shards by `product_id`, so each change reads exactly one shard.
1 in 5Changes that alert on sale dayOn a normal day almost none do; in a sale, many products cross their watchers’ targets.
50 msOne push or emailToo slow to do inline, so sending goes on a queue.
1Shard per changeSharding by product_id sends each price change to exactly one shard.
+5%Re-arm marginAn alert fires again only after the price has gone back up, so bounces stay quiet.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.