Design a online ticketing platform like Ticketmaster

Design a online ticketing platform like Ticketmaster

Design an online ticketing platform that allows users to browse, purchase, and manage tickets for live events such as concerts, sports games, theater performances, and other entertainment experiences. The system should support high traffic volume, with approximately 100 million daily active users (DAU), and handle large spikes during popular event releases.

Functional Requirements

Let’s define what our ticketing platform must support:

  1. Search Events: Users should be able to search and filter events by category, location, date, or performer/team
  2. View Event Details: Users should be able to view detailed information about an event, including venue, time, seating chart, and ticket availability
  3. Book Tickets: Users should be able to select seats, initiate purchase, and complete payment securely
  4. Manage Bookings: Users should be able to view, cancel, or transfer their purchased tickets

Non-Functional Requirements

The system must be robust, scalable, and performant under heavy traffic:

  1. High Scalability: Handle traffic surges during major ticket releases (e.g. concerts, playoffs)
  2. Strong Consistency: Ensure no double-booking of seats; transactional integrity is critical
  3. High Availability: Event browsing and search should remain available even during peak traffic
  4. Low Latency: Fast response times for event discovery and booking flows; reads >> writes
  5. Security & Fraud Prevention: Protect against bots, scalpers, and fraudulent purchases

Core Entities

  1. Event: A scheduled show, concert, or game users can attend
  2. Venue: The physical location where the event is held
  3. Performer: The artist, speaker, or team associated with the event
  4. Ticket: A purchasable item that grants entry to a specific seat at an event

API Design

We'll define RESTful endpoints for event browsing, ticket booking, and search functionality


// Get detailed event information
GET /events/:eventId
Response:
{
  "eventId": "e12345",
  "title": "Coldplay World Tour",
  "date": "2025-08-10T19:00:00Z",
  "venue": {
    "venueId": "v6789",
    "name": "Madison Square Garden",
    "location": "New York, NY"
  },
  "performers": [
    { "performerId": "p101", "name": "Coldplay" }
  ],
  "tickets": [
    { "ticketId": "t5678", "seat": "A12", "price": 150, "status": "available" }
  ]
}

// Search events
GET /search?term={term}&location={location}&type={type}&date={date}
Response:
{
  "events": [
    { "eventId": "e12345", "title": "Coldplay World Tour", "date": "2025-08-10" },
    { "eventId": "e67890", "title": "NBA Finals Game 3", "date": "2025-06-05" }
  ]
}

// Reserve a ticket (authenticated)
POST /booking/reserve
Headers:
  Authorization: Bearer 
Request:
{
  "ticketId": "t5678"
}
Response:
{
  "reservationId": "r7890",
  "status": "reserved",
  "expiresAt": "2025-07-18T12:05:00Z"
}

// Confirm booking & purchase (authenticated)
POST /booking/confirm
Headers:
  Authorization: Bearer 
Request:
{
  "ticketId": "t5678",
  "paymentMethod": "stripe",
  "paymentToken": "tok_1234567890"
}
Response:
{
  "orderId": "o7890",
  "status": "confirmed",
  "ticket": {
    "ticketId": "t5678",
    "eventId": "e1234",
    "barcode": "abc123xyz"
  }
}

High-Level Design

Image 1 for blog post titled 'Design Ticketmaster'

Schemas

Event: Represents an upcoming show or performance. Each event is tied to a venue and performer, and contains its own ticket inventory.


Event:
- id: string
- venueId: string
- performerId: string
- tickets: Ticket[]
- name: string
- description: string

Venue: Physical location where the event takes place. Includes details like address and seating layout.


Venue:
- id: string
- location: string
- seatMap: SeatMap  // Layout of the venue seating

Performer: Artist, band, team, or speaker participating in an event. Can be linked to multiple events.


Performer:
- id: string
- name: string
- genre?: string  // Optional, e.g. rock, pop, comedy

Ticket: Represents a seat reservation for a specific event. Tracks price, status, and ownership.


Ticket:
- id: string
- eventId: string
- seat: string
- price: number
- status: 'available' | 'reserved' | 'booked'
- userId?: string
- reservedTimestamp?: Date

Search Example: Simple SQL query to filter events by type and keyword. Case-insensitive name match.


SELECT *
FROM Event
WHERE type IN ('concert', 'sports', 'theater')
  AND name ILIKE '%term%';

Deep Dives

  • ElasticSearch: Enables fast and relevant full-text search with support for complex query patterns. It provides scalable, high-performance indexing for events, venues, and performers.
  • CDC (Change Data Capture): Captures real-time (or near real-time) changes — including INSERT, UPDATE, and DELETE — from the primary database, ensuring downstream systems stay in sync.
  • Postgres → ElasticSearch Data Pipeline: Use CDC to stream changes from Postgres into ElasticSearch. This keeps search indices up-to-date with minimal latency, ensuring users see fresh event and ticket data.

I hope this gives you a comprehensive understanding of the key components and challenges involved in designing a scalable online ticketing platform like Ticketmaster!