Design a Ticket Booking System
A case study of a BookMyShow or IRCTC style booking system, covering seat inventory, expiring holds, double-booking prevention and flash-sale traffic.
Requirements
A ticket booking system lets many people pick specific seats for a show or train, pay for them and receive a confirmed ticket. The hard part is that thousands of people want the same few seats at the same moment.
Functional:
- Browse shows or trains and see which seats are free.
- Select seats and hold them for a few minutes (a temporary reservation).
- Pay, then receive a confirmed booking.
- Release held seats automatically if payment does not finish.
- Cancel and refund.
Non-functional:
- Never sell one seat twice. This is the one rule that cannot bend.
- Survive a flash sale: a popular show opens and a huge crowd arrives together.
- Seat map reads can be slightly stale; booking writes cannot.
- Fair: do not let bots or fast connections take everything.
1 of 11