Design an online real-time chess game
Company: OpenAI
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Technical Screen
## System Design: Online real-time chess (e.g., chess.com)
Design an online service where users can:
- Sign in and play chess games in real time against another player.
- Use matchmaking (e.g., based on rating and time control).
- Make moves, see opponent moves quickly, and have accurate clocks (e.g., 5+0, 3+2).
- Reconnect if their network drops.
### Clarifications to cover
- Target scale (e.g., DAU, concurrent games, peak QPS).
- Latency goals for move delivery and clock updates.
- Game modes: rated/unrated, casual/friends, spectators.
- Storage needs: game history, user profiles, ratings.
- Anti-cheat / abuse considerations.
### Deliverables
- APIs and core services.
- Data model for games, moves, users.
- Real-time communication approach.
- How you ensure consistency of game state and clocks.
- Scaling and failure handling.
Quick Answer: This System Design question evaluates a candidate's competency in designing real-time distributed systems, covering low-latency messaging, state consistency and synchronization, accurate game clocks, matchmaking, persistence for game history and user profiles, and anti-cheat and operational considerations.