Lesson 2 of 15
43. Design Flash-Sale Ticket Booking (Ticketmaster / IRCTC Tatkal)

43.1 What do you ask first?

3 min read+10 XP

Step 1: Requirements (5 minutes)

LetterCandidate asksInterviewer answers
Scope"Numbered seats or general admission? Seat map selection or best available? Limits per person? Payment inside the flow?""Numbered seats, best available within a chosen section. Up to 4 per account. Payment within a few minutes."
Count"How many seats, how many people?""50,000 seats. About 2 million people waiting at 10:00."
Access pattern"When do they arrive?""Most in the minute before and after 10:00, refreshing constantly. Plus bots."
Latency"What must users experience?""No crashes, an honest wait, and if they get a seat, enough time to pay."
Exactness"Can we double-sell a seat? Is fairness a requirement?""Never double-sell. Fair to people, not to bots."

Agreed requirements:

  • Functional (verbs): people wait for the sale; get admitted in order; pick and hold seats; pay within a time limit; receive tickets; unpaid holds return to sale.
  • Non-functional (adjectives): survives a 2-million-person burst without falling over, never double-sells, fair (bots don't win by speed), honest (clear queue position, clear "sold out"), protects downstream systems (seat inventory, payments).

Interviewer pushback:

  • "Why not just scale the booking system to 2 million users?" → Because the bottleneck isn't servers, it's seats: 2 million people competing for 50,000 seats means most requests touch the same few hot rows. Letting everyone in at once just turns contention into failures. Admit people at the rate seats can actually be sold.

Memory code: "Ask how many seats, how many people, and who's a bot."