Design an online ticketing system similar to Ticketmaster that supports very high concurrency for popular events where many users try to purchase tickets at the same time.
The system must satisfy the following requirements:
-
High-concurrency ticket purchase
-
Tens or hundreds of thousands of users may attempt to buy tickets for the same event at the same moment.
-
Avoid overselling seats while keeping user-facing latency low.
-
Inventory and seat management
-
Events can have multiple sections and seats (e.g., seat-level inventory).
-
When a user starts checkout, seats are
reserved
for a short time (e.g., 5 minutes).
-
Reservations must expire automatically if payment is not completed in time, returning seats to the available pool.
-
Payment timeout and guarantee
-
Payment is handled via external payment providers that may take several seconds.
-
If payment succeeds within the allowed time, the user must
always
receive tickets for the seats they saw as reserved ("payment implies ticket issuance").
-
If payment fails or times out, the seats should be released.
-
Sold-out handling and waitlist
-
When an event is sold out (no seats immediately available), users can join a
waitlist
.
-
If previously held seats are released (e.g., due to reservation or payment expiration), users on the waitlist should be automatically offered those seats in a fair order.
-
Consider how to notify users and how long they have to claim newly available tickets.
-
Consistency and correctness
-
Ensure no double-selling of the same seat, even under high load and in distributed deployments.
-
Explain how you handle race conditions (multiple users trying to reserve the same seat) and what consistency guarantees you provide.
-
Scalability and performance
-
The system should scale horizontally to handle large on-sales.
-
Consider read/write patterns: browsing events, selecting seats, creating reservations, performing checkout, and ticket issuance.
-
Propose a data model and storage strategy for events, seats, reservations, and orders.
-
APIs and components
-
Describe the main services/components (e.g., API gateway, event catalog service, inventory/reservation service, payment service, waitlist service).
-
Sketch the key APIs for: search events, get seating map, create reservation, confirm purchase (payment), cancel reservation, join waitlist.
Describe your design end to end. Discuss data modeling, concurrency control, reservation and expiration logic, integration with payment providers, waitlist behavior, and how you would test and monitor such a system in production.