Game Leaderboard
Rank millions of players in real time — and keep the top-100 page instant.
Keep the top-100 board instant through the season finale while score writes never stop.
Top-100 reads are white-hot and identical for every player — a cache should serve nearly all of them. Score writes are a steady trickle by comparison; the KV store only needs to see cache misses and updates, never the read stampede.
Components in play
- Leaderboard API — Serves rank queries and accepts score submissions.
- Top-100 cache — Holds the hot board in memory — every player asks for the same page.
- Scores store — Sorted-set store; source of truth for every player's score.
Graded on these SLOs
- ≥ 99.00%Ranks load
- ≤ 90 msRank p99
- ≥ 5.0k rpsSustain the reads
- ≤ 6Lean footprint
The brief
Design a leaderboard for an online game. Players submit scores continuously; everyone wants to see the top-100 board and their own rank. Score writes are a steady trickle — reads of the top page are a firehose, and every player is asking for the exact same page.
Functional
- Submit a score for a player
- Fetch the top-100 board
- Fetch a single player's current rank
Non-functional
- Read-heavy — top-100 reads vastly outnumber score writes
- Rank reads must be low-latency, especially during live events
- Small delay before a new score reflects in the board (seconds) is fine
Warm-up: design decisions
Optional theory to prime the calls a senior engineer would make before you build.
Solving is a Pro feature
Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.
- AI design coach on your canvas — pins failure points & over-engineering
- Honest AI design review on every run
- All 12 problems + unlimited chaos simulator
- Points, levels & leaderboard