intermediateReal System Design Problems
Design a real-time Leaderboard — ranking millions of players by score.
The 'sorted data at scale' problem: a relational database struggles with real-time rank queries at scale, which is exactly why Redis sorted sets (ZADD/ZRANK/ZREVRANGE) are the standard answer, giving O(log n) rank/update instead of a full sort on every query. At senior level, the probe extends to multi-dimensional rankings (daily/weekly/all-time) and historical leaderboard snapshots.
This is a Pro question
Sign in, then upgrade to Pro or Power to unlock this question and the full Interview Prep bank.
Design a real-time Leaderboard — ranking millions of players by score.