Mock Interviewer

Ask Coach

Ask Coach
Clarify requirements before you design — kept separate from your stage notes.

Tap a question to start, or type your own below.

Game Leaderboard System Design

Visual Problem Diagram

Game Leaderboard System Design architecture diagram

Scenario

Boss kill weekend: 5M players submit scores in an hour and the global top-100 must update within seconds without sorting five million rows on every read. The interview contrasts real-time top-K, sharded ranks, and periodic reset leaderboards.

Design a game leaderboard that ingests score submissions and serves global top-N and personal rank queries in near real time. Naive "sort all scores on read" fails at million-player scale.

You should support score submit, global/friends boards, tie-breaking, and periodic resets. Be ready to explain sorted sets, sharding, and cached top-K.

Constraints

Functional

Submit score, global top-N, rank around user, friends board optional, daily/weekly reset

Non-functional

< 100 ms top-100 read p95, accept millions writes/hour, approximate rank OK if stated

Scale

10M DAU, 1K scores/s peak, 100M historical players, global + per-game boards

Stages ahead

1Requirement Analysis
2API Design
3High-Level Design
4HLD Extensions
5Trade-offs

Log in to start practicing

Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.