Practice: Design Real-time Quiz Platform
Live quiz platform inspired by Kahoot: games routed by PIN to WebSocket gateways, one owner per game state machine, questions broadcast to all players at once, server-timestamped answers, and live leaderboards in Redis sorted sets. A teaching design.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Host creates a quiz and starts a game room; players join via a short PIN code
- Host advances questions one at a time; all players receive the question simultaneously
- Players submit answers within the time limit; answer is timestamped server-side
- After each question, correct/incorrect result and points earned are shown to each player
- Live leaderboard updates after every question showing top N players by cumulative score
- Host sees answer distribution (% chose each option) in real time as answers arrive
Non-functional requirements
- Question broadcast latency < 200ms from host action to all 10,000 players receiving it
- Answer submission latency < 100ms p99 from player tap to server acknowledgement
- Leaderboard update latency < 500ms from question close to all players seeing new rankings
- Support 10,000 simultaneous players in a single room
- Support 100,000 concurrent rooms globally
- Answer timestamps must be server-side — client clocks cannot affect scoring