KatInterview

Design a Concert & Event Ticket Sales Platform

System DesignModel answer
MediumModel answerSystem Designsystem-designdistributed-systemsconsistency

Last updated

Design a seat reservation system for high-demand events, covering inventory consistency, surge traffic, payment edge cases, and failure recovery.

Design a Concert & Event Ticket Sales Platform

You are building the backend for a ticket sales platform that handles high-demand events — think a stadium concert where tens of thousands of seats go on sale simultaneously.

Your system needs to let users browse upcoming events, check what seats or sections are still available, temporarily lock a seat while they check out, process payment, and receive a confirmed booking. The golden rule: the same seat must never be confirmed to two separate buyers.

Walk through your design end to end. Cover the data model, key APIs, how you handle the flood of traffic the moment sales open, and how you recover gracefully from failures.

What to address

  • The services or components you would build and how they interact
  • How you model seat state and enforce that no two users can confirm the same seat
  • How you handle temporary holds and what happens when they expire
  • How you protect the inventory store when traffic spikes at sale-open
  • How you handle payment provider timeouts where it is unclear whether a charge succeeded
  • Where you apply caching, and what consistency guarantees each layer needs
  • How you would detect and alert on problems in production

Constraints and rules

  • A seat confirmed to one order must never be confirmed to a second order, under any failure mode
  • Holds are time-limited: if the user does not complete checkout within a configured window, the seat is released back to available inventory
  • Event catalog data and general availability counts can be slightly stale; the actual per-seat lock during checkout cannot
  • Payment providers can time out mid-charge, leaving the outcome genuinely ambiguous

Good clarifying questions to open with

  • Are seats individually assigned (row/seat number) or is this general admission where only a quantity matters?
  • What fairness model is expected when sales open — first come first served, a virtual waiting room, or a lottery?
  • Can a single hold span a set of adjacent seats, and does that constraint need to be enforced atomically?
  • What is the target scale — peak RPS at sale-open, geography, and expected event catalog size?

Hints

Hint 1

Start by separating read-heavy concerns (browsing, availability counts) from the write-critical path (holds and confirmations). These have very different consistency and scaling requirements, so mixing them in one service creates unnecessary bottlenecks.

Hint 2

Think about seat state as a small finite state machine: available → held → confirmed (or held → available on expiry). The key question is how you make that transition atomic across concurrent requests — a database row lock, an optimistic version check, or a Redis SET NX are all candidates worth comparing.

Hint 3

Payment timeouts are the hardest failure case. Sketch out what your system does in the window between 'charge sent' and 'no response received': does it hold the seat indefinitely, release it, or park the order in an ambiguous state to be reconciled asynchronously?