A cricket match ended. A suburb 15 km away broke.
transcript
A cricket match ends in Bengaluru. The crowd reaches for their phones. Fifteen kilometres away, the delivery app stops working.
The match ends at 8:31 pm. 30,000 people open the app in 10 minutes. In two cells. The city's location shard hits 100 percent CPU. And Whitefield, nowhere near the stadium, times out.
Here's why. The live index has one shard per city. One shard holds all of Bengaluru. Every stadium request scans cells packed with partners. So every Bengaluru request slows. Whitefield too.
But here's the twist. They all ask about the same two cells. Cache each cell's answer for a few seconds. 30,000 requests become a handful of computations.
Cap the work. No query needs all 3,000 partners in a cell. Shard by load, not area. The stadium gets its own small shard. Give it read replicas for match nights.
A hot cell is just a hot key, with a map attached. Cache it, cap it, split it.
Full breakdown in the lecture.