System Design Prompt
Design an online event ticketing platform (Ticketmaster-like) that allows users to:
-
Browse/search events and view seat maps (or ticket inventory).
-
Select seats (reserved seating) or ticket quantity (general admission).
-
Checkout and pay.
-
Receive a confirmed purchase (tickets/QR codes).
The system must handle flash-sale traffic (e.g., popular concerts) where many users attempt to buy the same limited inventory at the same time.
Requirements
Functional
-
Event discovery: list events, event details, seating/availability.
-
Purchase flow:
-
Temporarily
hold
seats while a user checks out.
-
Confirm purchase after successful payment.
-
Prevent overselling / double-booking.
-
Cancellations/timeouts: seat holds expire and inventory returns.
-
Basic anti-abuse: rate limiting / bot mitigation hooks.
Non-functional
-
High availability during on-sale.
-
Low latency for browsing; correctness (no double-sell) for checkout.
-
Scalability for spikes (hundreds of thousands to millions of concurrent users).
-
Auditability and supportability (logs, reconciliation).
Deliverables
Walk through:
-
APIs
-
Data model
-
Core architecture and key components
-
Concurrency control strategy for seat holds and purchase
-
Caching, queues, and failure handling
-
Key metrics and operational considerations