Runtyme
All practice problems

Backend Engineering · System design · Warm-up

System design practice: Midnight Chai Drop

It's quiet. Then it's very, very not quiet. Midnight Chai Drop at ChaiCart. Traffic builds to about 5,000 requests a second. One thing will go wrong.…

The problem

  • Midnight Chai Drop at ChaiCart. Traffic builds to about 5,000 requests a second. One thing will go wrong. Keep 99% of customers served and stay within ₹1,850.
  • Peak ≈ 5,000 req/s
  • Quiet until 8:00 PM, then a jump to the peak in two minutes
  • 55% of real traffic is the same offer page for everyone

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

Traffic that's identical for everyone (the offer page) belongs on the CDN. Set it up before the spike: servers take minutes to boot.

What this teaches (spoiler)

Prepare for spikes you can see coming, and push identical content to the edge.

Bug of the Day: a new problem every midnight, free for everyone. Keep a streak with your friends.