AdvancedSystem-Design
45 min
Design a Ticket Booking System with Seat Inventory
ConcurrencyTransactionsPaymentsAnti-Abuse
Advertisement
Interview Question
Design a concert/movie ticketing platform with seat maps, concurrent holds, payment timeouts, and scalper/bot mitigation.
Key Points to Cover
- Seat inventory model and concurrency control (holds vs purchases)
- Short-lived reservations with TTL and idempotent checkout
- High-traffic on-sales handling; queueing and fairness
- Anti-bot protections (proof-of-work, device attestation, rate limits)
- Resale/transfer flows and fraud checks
- Reconciliation and oversell prevention
Evaluation Rubric
Correct seat model & concurrency30% weight
Scales on on-sales with fairness25% weight
Mitigates bots/scalping risks25% weight
Idempotent, reconciled payments20% weight
Hints
- 💡Use hold tokens and visibility timeouts to avoid double-sell.
Common Pitfalls to Avoid
- ⚠️Underestimating the complexity of distributed transactions and choosing inappropriate implementation strategies.
- ⚠️Neglecting the importance of idempotency, leading to duplicate charges or seat reservations.
- ⚠️Over-reliance on client-side validation for security, which can be easily bypassed by bots.
- ⚠️Implementing overly aggressive bot mitigation that negatively impacts legitimate users or causes false positives.
- ⚠️Failing to consider the failure scenarios of each component (database, payment gateway, network) and design appropriate fallback and retry mechanisms.
Potential Follow-up Questions
- ❓How do you implement virtual waiting rooms?
- ❓How to handle seating upgrades/cross-sells?
Advertisement