AlgoViz

Design Ticketmaster

hard 55 min

Sell numbered seats to far more people than there are seats.

Agree on the scope

Ask what changes the design, then commit to a short list.

Clarifying requirements

  1. Interviewer

    Let's design a ticket service like Ticketmaster.

  2. You

    The core is unique stock that cannot be restocked. Before I draw:

    • Numbered seats, or general admission too? I will do numbered.
    • How big is the largest sale? I would assume 14 million visitors for 50,000 to 80,000 seats.
    • How long may a shopper keep seats? I suggest ten minutes.
    • Do we take payment ourselves? I assume a card provider.
    • Resale, transfers, dynamic prices?
  3. Interviewer

    Numbered seats, that size of sale, a provider for cards. Transfers are a small addition; no resale. What worries you in the big sale?

  4. You

    Three naive ideas fail:

    • Letting all in: at 100,000 queries a second, 14 million first queries alone take 140 seconds.
    • Telling most to try again: the luckiest and fastest win, and everyone presses reload.
    • First come, first served with no line: the first seconds decide, and the servers fall over.

Functional requirements

  • Find events by artist, venue, date, place and kind
  • Seat map with free seats
  • Hold up to eight seats for ten minutes
  • Pay and receive tickets
  • Organisers manage events, prices and seats
  • A fair line for large sales
  • Alerts for sales and changes

Out of scope for now

  • Resale market
  • Dynamic prices
  • Door hardware
  • Organiser payouts

Non-functional requirements

QualityTargetWhy
Correctnessno seat sold twiceTwo people, one chair
Availability99.99%, 53 minutes a yearA lost sale minute does not return
Search200 ms p99Cached
Hold500 ms p99A click should feel decided
Checkout2 s p99 without bank promptsThe provider is the slow part
Place in linea few seconds oldNobody needs more
Durabilityno paid order lostIt is the fan's property
Freshnessmap 1 to 5 s, search 60 sThe hold decides anyway
Fairnessspeed wins nothingTrust

Why these questions

Each answer changes the design

You askIf the answer isThen
Numbered seats?General admissionA counter per section, see inventory
How many visitors for one sale?ThousandsNo waiting room
Can payment take minutes?YesA paying state that time does not free
Adjacent seats wanted?AlwaysHold all or none, and suggest a near pair
Is first come, first served the law?YesOrder by arrival and say so