Problem statement
Design a global leaderboard that ranks players by score, serves the top-N ranked list, and answers "what is my rank?" for any single player (think the season ladder in a popular competitive mobile game). Scores change constantly as matches finish, so ranks must move in near real time.
Operating context. The active season holds up to 50 million ranked players. A finished match posts a score delta, giving roughly 60,000 score updates/sec at peak and 15,000/sec at a quiet hour. Reads dominate: the client polls the top-100 board and the viewer's own neighbourhood (their rank plus a few players above and below) at around 400,000 reads/sec. You also serve per-region ladders (a handful of geographic regions, each ranked internally) AND one merged global ladder over all regions. Two players with the same score must break ties deterministically and identically on every read. Freshness target: a score change is reflected in rank within a couple of seconds.
Out of scope. Match-making and the game simulation, anti-cheat / score-fraud detection, the score FORMULA (assume the game hands you a final numeric score), account identity and auth, and historical season archives once a season closes. Assume other teams own those.
What to produce. A high-level architecture covering: the ranked-score store and why a sorted structure (not a scan-and-sort) backs top-N and rank-of-user; the write path for a score update and how it stays near real time; how you shard a 50-million-player set across nodes yet still answer a GLOBAL top-N and a global rank-of-user by merging shards; the deterministic tie-break rule and where it lives; the per-region versus merged-global ladder story; and the caching strategy for the hammered top-N read without serving a stale or inconsistent rank. Sketch the components and the request flow between them; checkpoints probe the shard-merge and the rank-of-user cost specifically.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design HLD
- Scaling Read-Heavy
- Scaling Fanout
- Geo Sharding
- Data Cache