BookMyShow: HLD Breakdown
Ticket booking looks simple: pick a seat, pay, done. The hard part is guaranteeing that one seat belongs to exactly one person.
Not as Simple as It Looks
A lot of people think ticket booking is simple:
Open app → Select movie → Select theater → Select seat → Pay → Done.
Sounds simple, right? Wrong.
One Seat, Two Customers
Imagine a blockbuster release. Thousands of users are trying to book tickets for the same show. Two of them see the same seat:
A1 → AVAILABLE User A → "Book A1" User B → "Book A1"
If both requests reach the database at the same time, you have a race condition. One seat. Two customers.
This is where system design comes in.
Locking Seats with Redis
A common solution is seat locking with Redis, which provides fast, temporary state management. Instead of booking a seat directly, it moves through three states:
When a user selects A1, the seat is temporarily locked, for example for 5 minutes. During this period other users cannot book the seat, the user completes the payment, and the booking process continues.
Payment succeeds
LOCKED → BOOKED
Payment fails or lock expires
LOCKED → AVAILABLE
But That's Not the End
A production-scale ticket booking system has to handle many other failure scenarios and high-traffic situations:
- 01Payment failures and retries
- 02Duplicate payment requests
- 03Regional traffic spikes
- 04Load balancing and Auto Scaling
- 05Caching and CDN
- 06Show cancellations and rescheduling
- 07Notification delivery
- 08API timeouts and retries
- 09Idempotency
Surviving Release Day
During a major movie release, three layers work together:
CloudFront
Serves cacheable content from edge locations, so most read traffic never reaches your servers.
Load Balancer
Distributes incoming traffic across healthy servers.
Auto Scaling
Adds or removes instances based on demand, then scales back when the rush ends.
So behind a simple Select Seat → Pay → Confirm there is a system designed to handle concurrency, consistency, failures and massive traffic spikes without selling the same seat twice.
The Real Challenge
The real challenge isn't building a ticket-booking application. It's keeping the system correct when thousands of users try to do the same thing at the same time.
Join the Conversation
This article started as a post on LinkedIn. Share your take there.
Related blog
AWS EC2 Production Deployment Guide
