Backend Engineering · System design · Warm-up
System design practice: Republic Day Offer
The payment provider is having a bad night. Republic Day Offer at ChaiCart. Traffic builds to about 9,000 requests a second. One thing will go wrong.…
The problem
- Republic Day Offer at ChaiCart. Traffic builds to about 9,000 requests a second. One thing will go wrong. Keep 99% of customers served and stay within ₹5,100.
- Peak ≈ 9,000 req/s
- ⚠ Payments slow down from 7:41 PM. 23% of requests are checkouts
You'll use: System design · Caching · CDN · Queues & workers · Database replicas · Rate limiting
Show a hint
Traffic that's identical for everyone (the offer page) belongs on the CDN. Set it up before the spike: servers take minutes to boot. 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)
Prepare for spikes you can see coming, and push identical content to the edge. 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.