DEV Community

Sumedh Bala
Sumedh Bala

Posted on

Designing a Large-Scale Ticketing System

Introduction

Inspired by https://www.youtube.com/watch?v=fhdPyoO6aXI&t=48s
Ticketing systems such as Ticketmaster or Eventbrite appear simple on the surface: a user finds an event, selects a seat, and completes the purchase. To a user, it feels like a straightforward transaction. In reality, these systems are among the most challenging distributed systems to design because they must handle extreme concurrency, strict consistency requirements, fraud prevention, and unpredictable demand spikes.

This series will walk through the design of a ticketing system step by step, highlighting the functional requirements, non-functional requirements, design trade-offs, and architectural patterns that are relevant for a system design interview.

This series takes a different approach:

  • Go deep into multiple areas – sometimes interviewers drive the follow-ups, not the candidate. Each functional requirement is treated as a system design interview in itself.
  • Cover database schemas and APIs – some interviewers want to see practical modeling and integration.
  • Build reusable solutions – patterns from one domain (e.g., event search) can often apply to others (e.g., product search).

Functional Requirements

A ticketing system supports the entire user journey: discovery, selection, purchase, and ticket delivery.

Event Discovery

  • Search for events by location, category, or date.
  • View event details (venue, performers, time).

Seat Selection

  • Display seating maps with real-time availability.
  • Support both reserved seating (specific seat numbers) and general admission (ticket buckets).

Reservation

  • Temporarily reserve seats while a user is in the checkout flow.
  • Expire reservations if payment is not completed within a time limit (usually 2–10 minutes depending on policy).

Purchase & Payment

  • Securely process payments.
  • Ensure idempotency (no double-charging if retries occur).

Ticket Issuance

  • Generate a digital ticket (QR/barcode) upon successful purchase.
  • Send confirmation via email and/or mobile app.

Non-Functional Requirements

Large-scale ticketing systems are defined as much by how they perform under stress as by their feature set.

Scalability

  • Handle sudden spikes (e.g., millions of users joining at ticket release time).
  • Support horizontal scaling across multiple regions.
  • Adapt to bursty traffic patterns rather than steady-state load.

Low Latency

  • Fast responses for search, seat availability, and reservation status (<200 ms target for most read queries).
  • Low latency matters because delays directly increase user drop-off during checkout.

Reliability & Consistency

  • Ensure no double-booking of seats.
  • Strong consistency for seat inventory, eventual consistency acceptable for less critical data (e.g., search).
  • Techniques such as distributed locks or optimistic concurrency control are critical here.

Fault Tolerance

  • Gracefully handle partial failures (e.g., payment succeeds but DB write fails).
  • Use retries, dead-letter queues, and idempotent APIs.

Fairness & Security

  • Queueing or rate limiting to prevent system overload.
  • Anti-bot measures such as CAPTCHA, token-based access, and dynamic queueing systems to protect inventory.

Observability

  • Real-time logging, monitoring, and alerting.
  • Traceability for debugging failed transactions.

Roadmap for This Series

Each upcoming part of this series will address a key aspect of the system, with diagrams, real-world examples, and interview tips:

By the end of this series, you should be able to discuss the design of a large-scale ticketing system in a structured, interview-ready manner, while demonstrating the ability to balance correctness, scalability, and user experience.

Top comments (0)