Backend system design · about 45 minutes
Ticket booking for events
Design the service that sells tickets with numbered seats for concerts and sports events. When a popular sale opens, hundreds of thousands of buyers arrive in the same minute for a few tens of thousands of seats. Each seat must go to exactly one buyer, each buyer must pay exactly one time, and the site must stay available during the rush.
Ask first
- How many seats does a large event have, and how many buyers arrive when its sale opens?
- Are the seats numbered, or is it general admission, where only a count of tickets is sold?
- How long can a buyer keep a seat before the payment, and how many seats can one buyer take?
- Do we take the card payment ourselves, or does a payment provider take it?
- Must buyers enter in the order of arrival, and do we need protection against bots?
The outline
Write your own outline for each part first.
The strong answer, the pitfalls and the follow-ups opens with a year in the app. What a year includes