Design a Chess.com-Style Online Chess Platform
System Design · Real-time Matchmaking · Authoritative Game State
A platform like chess.com pairs two players quickly, places them in a shared game room, keeps both clients in sync on the same board, and enforces a strict clock. From the user’s perspective, the product feels like a lightweight realtime application, but the backend must remain the single source of truth for three essential facts: the final match result, the legal sequence of plies, and which player’s clock is active.
The players should experience a single shared board, but only the server may decide who was paired, which legal move happened next, and whose time was actually consumed. If those guarantees diverge, the product stops being chess and becomes two disconnected animations.
During clarification, define the time control early. Whether a mode uses increment or not changes both queue segmentation and how the server accounts for clock time after each accepted move.
99.95% availability for matchmaking, move submission, and canonical game-state reads within a healthy region.p95 < 250 ms for normal matchmaking in a healthy pool.p95 < 150 ms for move acknowledgement within a region.p95 < 1 s for opponent-visible updates after a committed move.3M daily active players and 150k peak concurrent live games.5k/s queue entries and 20k/s move submissions.| Metric | Planning value | Informs |
|---|---|---|
| Daily active players | ~3M | overall fleet sizing |
| Concurrent live games | ~150k peak | game-room sharding and websocket fanout |
| Queue entries | ~5k/s peak | matchmaking queue storage and pairing workers |
| Move submissions | ~20k/s peak | authoritative game-worker throughput and durable move log writes |
| Average game length | 60–100 plies | move log growth and snapshot frequency |
| Popular time controls | 3+2, 5+0, 10+0 | queue partitioning and clock model |
Treat these numbers as coarse capacity anchors. They motivate keeping short-lived matchmaking tickets separate from durable game state, and they show that one writer per game can remain the right shape at peak move volume.
High-Level Architecture — Matchmaking Pipeline and Authoritative Game Server