algomiBlogs
← All posts

Designing BookMyShow: Selling Each Seat Only Once While Thousands Rush In

Algomi Research · Created 2026-09-26 · Updated 2026-10-15 · System Design

System Design Case Studies · Part 11 of 15
Designing an Online Chess Game: Rules First, Servers SecondDesigning YouTube: From One Upload to a Video Anyone Can Play
Page 1 of 1

9:00 on a Friday, four friends, seats F5 to F8

Bookings for the first-day-first-show of a superstar's new film open at 9:00 on a Friday morning. Lakshmi and her three college friends have planned this for a month. They want seats F5 to F8, together, at a 400-seat theatre in Hyderabad. So do roughly 100,000 other fans, who open the page in the same minute. (Lakshmi, the theatre, Sameer and every number here are made up for teaching.)

Sameer built the ticketing app, ShowTime. His mental model is a small cinema's box office. The box office has one paper chart of every seat. Two customers stand at two counters and both point at F7. The clerks must not both write "sold." Someone has to decide who wins, and the loser must be told immediately.

An online ticketing service has the same problem with a far bigger crowd: thousands of people looking at the same seat map at the same moment, for a few hundred seats. This guide designs a movie and event ticketing service in the style of BookMyShow. It is an original interview design, not the internal architecture of any named company.

What happens at 9:00 Idea it forces
"Two people both see F7 as free" The seat map is a picture; the hold is the promise
"Lakshmi needs four seats together, or none" Hold every seat in one atomic update
"Someone held seats and walked away" Holds that expire on their own
"Her payment page spun for a minute" Payment as a separate workflow, with reconciliation
"100,000 fans hit the page in a minute" Waiting room, cached seat maps, protecting the door

In 30 seconds, as an architect would frame it: "One invariant: for each show and seat, at most one active hold or confirmed booking. Seat maps come from a short-lived cache, but holds are made by one atomic update on the authoritative seat rows. Every chosen seat must be available, or its hold expired, or nothing is held. Expiry is checked by the claim itself, so correctness never waits on a cleanup job. Payment happens outside the transaction, with idempotency keys and reconciliation. For on-sale rushes, a waiting room protects the booking path, so the database only sees admitted users."

1. "Two people both see F7 as free": the rules

Users browse cities, movies, theatres and shows. They open a seat map, choose seats, pay and receive an e-ticket. Theatre staff publish shows, set prices and see sales. Cancellations and refunds follow a stated policy.

The invariant: for each show and seat, at most one active hold or confirmed booking exists.

Rule Why it matters
Sell a seat at most once Two people cannot sit in F7
Hold all chosen seats or none A group of four is useless with three seats
A hold expires on its own An abandoned checkout must not block a seat forever
Keep the price the user accepted Prices can change between hold and payment
A retry must not charge twice A network reply can vanish
Stop selling when the show starts Late sales are worthless and confusing

The seat map on the screen is a picture, not a promise. It may be a few seconds old, so the booking step always rechecks the truth.

Record Main fields Responsibility
Theatre and Screen theatre_id, screen_id, seat layout The physical rooms and their seat labels
Show show_id, screen_id, movie_id, starts_at One screening at one time
ShowSeat show_id, seat_id, state, hold_id, held_until, price Authoritative state of one seat for one show
Hold hold_id, user_id, seats, expires_at A temporary claim on a set of seats
Booking booking_id, hold_id, status, accepted_price The durable reservation
PaymentAttempt attempt_id, booking_id, provider_reference, status The external payment outcome
  • Make (show_id, seat_id) unique.
  • Create a show's seat rows when the show is scheduled, so a claim updates an existing row instead of inventing one.
  • Search over movies and theatres uses a separate read model, because "which shows are near me tonight?" and "is F7 free?" are different questions.
Movie and event ticket booking: step 1, hold a seat in one databaseStep 1 of 4: Hold a seat in one database. Components: Viewer app, API gateway, Booking and holds, ShowSeat. The core rule: a seat can be held by one booking at most, decided by an atomic update in the seat database. CLIENTS ENTRY SERVICES SEAT DATABASE Viewer app browse, pick seats, pay API API gateway limits and authentication Booking and holds ShowSeat state, hold, expiry hold seats atomic hold HTTPS call service data store people, apps, external
Step 1: the smallest design that works.

You've reached the free preview of this post.

Subscribe to the Blogs plan (₹99/mo) — or use any Algomi Suite, Career, Investor, or Trader plan — to keep reading.

See plans

Sources

System Design Case Studies · Part 11 of 15
Designing an Online Chess Game: Rules First, Servers SecondDesigning YouTube: From One Upload to a Video Anyone Can Play