All practice problems Bug of the Day: a new problem every midnight, free for everyone. Keep a streak with your friends.
Backend Engineering · System design · Warm-up
System design practice: New Year's Eve
The pay button is about to start spinning. New Year's Eve at ChaiCart. Traffic builds to about 6,000 requests a second. One thing will go wrong. Keep 99%…
The problem
- New Year's Eve at ChaiCart. Traffic builds to about 6,000 requests a second. One thing will go wrong. Keep 99% of customers served and stay within ₹4,150.
- Peak ≈ 6,000 req/s
- ⚠ Payments slow down from 7:40 PM. 35% of requests are checkouts
You'll use: System design · Caching · CDN · Queues & workers · Database replicas · Rate limiting
Solve it (expert level)2–3 min · No coding needed
Show a hint
Repeat reads of the same data belong in a cache, not in more database replicas. Don't make servers wait on slow payments: queue checkouts and let workers (~300/s each) handle them.
What this teaches (spoiler)
Read-heavy traffic is a caching problem first: answer repeat reads from memory. Never let a slow third party hold your servers hostage. Queue the work and reply immediately.