LeetDesign
← All problems
Medium

Design a Gaming Leaderboard

Millions of players reload the same top-100 pages while scores pour in underneath. A cache erases the read storm in one stroke — and the quiet number behind it is what actually sizes the fleet.

Design the leaderboard for a hit mobile game. Players open the rankings screen constantly and nearly always load the same thing: the first pages of the same global and weekly boards. Every finished match posts a score.

The read side looks terrifying and isn't: 120 thousand requests a second at peak, almost all of them for the same few thousand pages, under a contract that tolerates five seconds of staleness. Traffic with that shape begs to be absorbed before it ever reaches anything expensive. The write side looks quiet and isn't: thousands of score submissions a second that no cache can take off your hands — a write's only job is to reach the store of record, and it routes straight past every absorbing layer you build.

Size each tier by the traffic that actually reaches it. The loud number and the number that costs money are not the same number.