Skip to content
We areTOP 1%

Design a movie ticket booking system

HardConceptClassic LLD Problems
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Model a service like BookMyShow where users browse movies by city, pick a show, select seats and pay. The critical requirement is that two users must never book the same seat.

  • Core classes: City, Cinema, Screen, Seat with a SeatType enum, Movie, Show, ShowSeat (a seat's status for one show), Booking, Payment and User.
  • Seat holds: when a user selects seats, mark the ShowSeat records as held with an expiry of a few minutes; confirm them when payment succeeds or release them on timeout.
  • Concurrency: take a hold with an atomic conditional update that changes the status only if the seat is still available, or use optimistic locking with a version column.
  • Patterns: Strategy for pricing and payment methods, Observer for booking confirmations and notifications.

More in Classic LLD Problems

Classic LLD Problems questions
#ProblemPlatformDifficultyOpen1st1st Visit2nd2nd VisitRevRevise
1Design a parking lot system
MediumConcept
ConceptMedium Read the answer to Design a parking lot system
2Design a vending machine
MediumConcept
ConceptMedium Read the answer to Design a vending machine
3Design an elevator system
HardConcept
ConceptHard Read the answer to Design an elevator system
4Design a movie ticket booking system
HardConcept
ConceptHard Read the answer to Design a movie ticket booking system

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account