KatInterview

Design a Real-Time Quiz Showdown with Buzzer Lockouts

System DesignModel answer
HardModel answerSystem Designreal-timewebsocketsmatchmaking

Last updated

Design a multiplayer live quiz system where players race to buzz in, wrong answers trigger a timed lockout, and fairness holds across varying network conditions.

Real-Time Quiz Showdown with Buzzer Lockouts

You're building the backend for a live quiz game. Matches have between 2 and 8 players. Each round, all players see the same question at the same time and compete to be the first to buzz in. Only the first player the server accepts gets to attempt an answer. A correct answer scores the round and triggers the next question. A wrong answer locks that player's buzzer for exactly one second, then reopens the question for everyone else (including, once their lockout expires, the player who just missed).

Your design should cover how buzz attempts are handled and adjudicated, how lockout state is tracked, and how players get placed into a match.


State your assumptions

Scale, geographic regions, question bank size, and exact scoring formulas are intentionally left open. State your assumptions clearly before diving in — treating them as design decisions, not gaps.

Good clarifying questions to think through

  • When a player's lockout ends mid-question, can they buzz in again, or is the question over?
  • Can friends create a private room together, and how long does the system wait before starting with fewer than 8 players?
  • Is player score per-match only, or does it feed into a persistent rating?
  • How many concurrent matches should the system support, and what happens when a player disconnects mid-round?

Part 1 — Buzz-in flow and lockout mechanics

Walk through the full lifecycle of a single round: from the question appearing on every client, to a player buzzing in, to the round resolving (correct or incorrect), to the next round starting.

Cover:

  • What connection model you use and why
  • Where "who buzzed first" is decided, and why that authority lives there
  • How the lockout is stored, applied, and lifted — with no unnecessary background jobs
  • What happens when two buzz attempts arrive within milliseconds of each other
  • How every player's UI stays consistent with server state

Part 2 — Matchmaking

Design the flow for getting players into a match, covering both public queues (strangers) and private rooms (friends). Address:

  • How you avoid players waiting forever for a full 8-person lobby
  • How private rooms differ from the public queue, and where they share logic

Follow-ups to address in your answer

  1. How would you maintain and update a persistent player rating across matches?
  2. A player with 10ms latency and a player with 80ms latency both press their buzzer at the exact same physical moment. The 10ms player wins every time under a naive design. How do you reduce this structural unfairness?

Hints

Hint 1

The server has to be the sole authority on who buzzed first — but 'first' shouldn't mean 'whose packet happened to arrive earliest due to geography.' Think about what timestamp you actually want to compare, and where the data to construct it comes from.

Hint 2

A lockout that expires in 1 second doesn't need a background timer firing at T+1000ms. Think about the smallest piece of state you'd store, and when and where you actually need to evaluate it — you'll find the check naturally happens at exactly the right moment.

Hint 3

Public matchmaking and private rooms look different on the surface but converge on the same 'spin up a match session' operation. Model them as two entry points to the same pipeline rather than two separate systems.