Learning on Web Dev Open is free for all.

Interview Prep · System DesignDesign a ticket sale
← System Design

Design a ticket sale

Hard45 minFree, no account

Sixty thousand seats, two million people, ninety seconds. The queue is the product.


The question

Design the system that sells tickets for a stadium show: 60,000 seats, two million people arriving at the same instant when sales open.

Nobody may be sold a seat that is already sold.

Functional
  • Browse the seat map and see what is available.
  • Hold a seat while entering payment.
  • Complete the purchase; the hold converts to a sale.
  • An abandoned hold returns to the pool.
Non-functional
  • 2M concurrent users at t=0; 60,000 seats.
  • A seat is never sold twice. This is the one thing that cannot be eventually consistent.
  • The site stays responsive, or visibly queues, rather than failing.
45:00Commit to an answer before you open the solution. Reading it first teaches you to recognise good answers, which is not the skill being tested.

Stuck?

0 of 3 hints taken

The worked solution

written by a person · not a grade

Score yourself

0 of 5 marked
  • Shaped demand with admission control rather than scaling to it30
  • Made seat assignment a single atomic conditional write25
  • Chose consistency for the seat and eventual for the map, explicitly20
  • Handled hold expiry including the crashed-session case15
  • Addressed payment idempotency10

We run no AI here and nothing on this page grades you. The score is yours, and the useful number is the one you get on the same problem a month from now, cold.

kept in this browser only