Back to problems
Game Leaderboard System Design (Real-Time Ranking at Scale)
Design a real-time leaderboard system for online games that tracks player scores, rankings, and provides various leaderboard views. The system should handle millions of players and frequent score updates.
Constraints
Functional
Update score, get ranking, get top N, multiple leaderboards (daily/weekly/all-time/region), ranking history, friends' rankings
Non-functional
Low latency (< 50ms for leaderboard), millions of score updates/s, near real-time rankings, millions of players, accurate and consistent
Scale
10M players, 100M games/day; ~1.2K updates/s (peak 5K), ~600 reads/s (peak 2K); ~2 GB player data, ~5 GB/day updates
Stages ahead
1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs