Skip to content

Ticket Master (Event Ticketing System)

Quick Reference Guide for System Design Interviews


Problem Statement

Design an event ticketing system like Ticketmaster that handles high-traffic ticket sales, prevents overselling, manages seat selection, and handles flash sales for popular events.


Requirements

Functional Requirements

  • Browse and search events
  • View venue seating map
  • Select and reserve seats
  • Complete purchase within time limit
  • Prevent double-booking
  • Support waitlists

Non-Functional Requirements

  • Availability: 99.99%
  • Consistency: Strong (no overselling)
  • Latency: < 200ms for seat availability
  • Scale: 100K concurrent users per event
  • Fairness: First-come-first-served

Key Challenges

Key Challenges


High-Level Architecture

High-Level Architecture


Seat Inventory Management

Seat Inventory Model

Database Schema:

CREATE TABLE seats (
    event_id       UUID,
    seat_id        VARCHAR(20),  -- 'A-1', 'B-15'
    section        VARCHAR(20),
    row            VARCHAR(10),
    seat_number    INT,
    price_tier     VARCHAR(20),
    price          DECIMAL(10,2),
    status         ENUM('available','reserved','sold'),
    reserved_by    UUID,
    reserved_at    TIMESTAMP,
    version        INT,  -- Optimistic locking
    PRIMARY KEY (event_id, seat_id)
);


Seat Reservation Flow

Seat Reservation Flow


Virtual Waiting Room

Virtual Waiting Room


Reservation Timeout

Reservation Timeout


Preventing Double-Booking

Preventing Double-Booking


Bot Prevention

Bot Prevention


Waitlist System

Waitlist System


Interview Discussion Points

  1. How do you prevent overselling?
  2. Distributed locks (Redis)
  3. Optimistic locking (DB version)
  4. Unique constraints
  5. All three layers for safety

  6. How do you handle flash sales?

  7. Virtual waiting room
  8. Rate-limited admission
  9. Scale backend horizontally

  10. How do you handle reservation timeout?

  11. Delayed queue with Redis ZSET
  12. Or Redis key expiry notifications
  13. Release seats, notify waitlist

  14. How do you prevent bots?

  15. CAPTCHA, rate limiting
  16. Device fingerprinting
  17. Purchase limits

  18. How do you ensure fairness?

  19. Waiting room queue
  20. First-come-first-served
  21. Randomized delays

  22. How do you handle payment failures?

  23. Retry with same reservation
  24. Extend timeout during retry
  25. Eventually release if failed