call(back)

Design Ticket Booking for a High-Demand On-Sale

Design a ticket-booking system for events where demand far exceeds supply and everyone arrives in the same second. The interviewer concentrates on two things and probes them separately.

The burst. When tickets go on sale, a very large number of users request at once. Explain the load balancing, the waiting room or queue, and the rate limiting that keep that burst from reaching the booking services and the database directly.

Inventory. The same ticket must never be sold to two people. Cover how inventory is decremented, how a seat is held while the buyer pays, how the hold is released if payment times out, and the roles of the cache and the database when updates are highly concurrent.

No scale was given in the interview; state your own numbers. Clarify whether seats are chosen individually or sold from a pool, and whether search and refunds are in scope, before expanding.

Hints

Hint 1

Keep a clear story for each axis. One diagram that glosses over the hold and release lifecycle will be picked apart.

Hint 2

The waiting room admits users at the rate checkout can sustain. Everything behind it then sees a smooth, bounded load.

Hint 3

A hold is a row with an expiry, created by one atomic conditional write. Payment success converts it; a timer or the expiry itself returns it.

Asked at

Similar Problems5