43. Design Flash-Sale Ticket Booking (Ticketmaster / IRCTC Tatkal)
1
The interview prompt2
43.1 What do you ask first?3
43.2 How big is this, really?4
43.3 What are the doors?5
43.4 What do we store?6
43.5 What does the whole system look like?7
43.6 How does the waiting room work?8
43.7 How does seat locking work?9
43.8 How do you rate-limit bots?10
43.9 How do you keep it fair?11
43.10 What would you say in the last five minutes?12
Score yourself13
Variations to practise14
Sources15
Code lab43. Design Flash-Sale Ticket Booking (Ticketmaster / IRCTC Tatkal)
43.10 What would you say in the last five minutes?
3 min read+10 XP
Step 6: Wrap-up (5 minutes)
- Bottlenecks: seat inventory rows (sections, conditional updates, admit rate) and payment provider throughput (admit rate tuned to it, second provider).
- Single points of failure: the waiting room (replicated store, or managed service; if it fails, pause admissions rather than open the floodgates).
- Correctness: conditional holds, expiring holds, idempotent payments, tickets issued only for paid holds.
- Fairness and abuse: verified accounts, per-account limits, edge bot defences, randomised opening, signed tokens.
- Rehearsal: load-test the burst and the "everyone refreshes at 9:59" pattern; pre-scale (Chapter 41).
- Next with more time: dynamic pricing, resale marketplace with price caps, accessibility seating, and group bookings that keep friends together.
Memory code: "Meter the crowd, hold seats briefly, shuffle the rush, and stop the bots at the door."