Design TicketMaster system
Problem Statement
Design TicketMaster, a large-scale, event-ticket booking platform that allows users to browse events, select seats, and purchase tickets for concerts, sports, theater, and other live events — all in real time and with high reliability under flash-sale conditions.
🎯 Objective
Build a scalable, highly available ticketing platform that supports:
✅ Functional Requirements
1. Event Management
2. Event Discovery
3. Seat Selection & Locking
4. Booking & Payments
5. Notifications
6. Cancellations & Refunds
7. Admin Portal
⚙️ Non-Functional Requirements
| Requirement | Description |
| ---------------- | -------------------------------------------------------------------------- |
| **Scalability** | Must handle millions of users and flash-sale surges (e.g., concert drops). |
| **Consistency** | Strong consistency needed for seat availability & booking. |
| **Latency** | Seat selection and availability checks must complete in < 200 ms. |
| **Reliability** | No double-bookings; fault tolerance during booking/payment. |
| **Availability** | ≥ 99.99% uptime for booking and event browsing. |
| **Security** | Secure payments, user data encryption, fraud detection. |
| **Durability** | Ticket data and payments must never be lost. |
🧠 Key Components to Design
1. Event Service
2. Search & Discovery Service
3. Seat Inventory Service
4. Booking Service
5. Payment Service
6. User Service
7. Notification Service
8. Analytics Service
🧩 Data Model (Example)
Event Table
| Field | Type | Description |
| ---------- | --------- | ---------------------- |
| event_id | UUID | Primary key |
| name | String | Event title |
| venue_id | UUID | Venue reference |
| start_time | Timestamp | Event start |
| category | String | Concert/Sports/Theatre |
| status | Enum | Active/Cancelled |
Seat Table
| Field | Type | Description |
| ----------- | --------- | --------------------------- |
| seat_id | UUID | Primary key |
| event_id | UUID | Associated event |
| seat_number | String | e.g. A12 |
| section | String | e.g. Balcony |
| price | Decimal | Seat price |
| status | Enum | AVAILABLE / LOCKED / BOOKED |
| lock_expiry | Timestamp | Lock TTL |
Booking Table
| Field | Type | Description |
| ---------- | --------- | ---------------------------- |
| booking_id | UUID | Primary key |
| user_id | UUID | User reference |
| event_id | UUID | Event booked |
| seats | JSON[] | Seat list |
| amount | Decimal | Total |
| status | Enum | PENDING / CONFIRMED / FAILED |
| created_at | Timestamp | Timestamp |
🧱 High-Level Architecture
1
2 ┌──────────────────┐
3 │ Web / Mobile │
4 │ Clients │
5 └────────┬──────────┘
6 │
7 ┌──────┴────────────────────────┐
8 │ API Gateway │
9 └──────┬────────────────────────┘
10 │
11 ┌───────────────┼─────────────────────────────┐
12 │ │ │
13 │ Booking Service Event Service
14 │ │ │
15 │ Seat Inventory Service Search Service
16 │ │ │
17 │ Payment Service User Service
18 │ │ │
19 │ Notification Service Analytics Service
20 └───────────────┼─────────────────────────────┘
21 │
22 ┌──────┴───────────┐
23 │ Database Cluster │
24 │ (SQL + Redis) │
25 └──────────────────┘
26 │
27 ┌──────┴───────────┐
28 │ Message Queue │
29 │ (Kafka/SQS) │
30 └──────────────────┘🚀 Scalability & Optimization
🔐 Security Considerations
⚠️ Failure Scenarios & Mitigations
| Failure | Mitigation |
| ----------------- | --------------------------------------------------- |
| Double booking | Redis atomic seat lock + transaction rollback |
| Payment timeout | Use async confirmation via message queue |
| Service crash | Retry via idempotent booking IDs |
| Lock not released | Use TTL-based expiry |
| Surge traffic | Auto-scale services & use distributed load balancer |
✅ Final Deliverable:
A fault-tolerant, real-time, and scalable event ticketing system that supports seat-level booking, real-time availability, and reliable payments under high-traffic conditions — like TicketMaster or BookMyShow.