Design a Ticket Booking System

HardTransactionsConcurrencyTransactionsQueuesCachingAbout 45 minutes

Design a booking system for concert tickets like Ticketmaster. Fans pick specific seats, hold them briefly during checkout, and pay. Popular shows sell 50,000 seats in minutes with 1M people trying at once. A seat must never be sold twice.

How the interview goes

Five phases, and questions the interviewer is likely to ask in each.

  1. 1. Requirements

    • How long should a hold last?
    • Is 'first come, first served' a requirement?
    Show a hint

    The hardest moment is the first minute of a big on-sale.

  2. 2. High-level design

    • Where does the seat state live during the rush?
    • How do you protect the booking service from the spike?
    Show a hint

    Not everyone has to reach the booking service at the same time.

  3. 3. Deep dive

    • Show me the exact operation that holds a seat.
    • Payment succeeds one second after the hold expired. Now what?
    Show a hint

    Make 'check the seat is free and take it' a single atomic step.

  4. 4. Scaling

    • How stale can the seat map be?
    • How do you shard when one event is the entire load?
    Show a hint

    The seat map can be slightly stale; holds cannot.

  5. 5. Trade-offs

    • Pessimistic versus optimistic concurrency for seats?
    • Is a waiting room worth the user frustration?
    Show a hint

    Think about where the lock is held and for how long.

Practice this with an AI interviewer

Write your design doc with live diagrams while the interviewer asks one question at a time and pushes on your choices. Get a scored debrief with what to study next.

Start this interview