System Design Playbook
02 · System designs100 users → 100M+ users13 min read

Design Eventbrite (event ticketing)

Sell a limited number of tickets without ever overselling, survive on-sales where demand is ten times the supply, and let thousands of people through the door in minutes. The core: inventory as the single source of truth, holds with expiry, a waiting room and verifiable tickets.

In one sentence

Treat ticket inventory as a strongly consistent counter (atomic updates, holds with TTL), put a waiting room in front of hot on-sales, and issue signed QR tickets that can be checked at the door.

A reference design: it covers what an app like this needs and follows how these companies have described their systems publicly, simplified to be learnable.

Requirements

Functional

  • Organizers create events with ticket types and capacity
  • Buyers find events, hold tickets and pay
  • Tickets delivered by email and wallet
  • Check-in at the door

Non-functional

  • Never sell more tickets than exist
  • Survive spikes of 10–100× normal traffic at on-sale time
  • Event pages: very read-heavy
  • Check-in fast and resilient to bad connectivity

Back-of-the-envelope estimates

MetricEstimate
Normal traffic~1M tickets / day ≈ 12 orders/s: tiny
Event page views~100 views per ticket sold → 1,200 reads/s
Big on-sale200K buyers in the first minute for 20K tickets ≈ 3,300 attempts/s on one event
Check-in40K people through the doors in 1 hour ≈ 11 scans/s per venue

Average load is small; the design is driven by the spike on a single event, which concentrates all the writes on one inventory counter.

API and data model

GET  /events/:id                                → event page (cached)
POST /events/:id/holds   { ticketTypeId, qty }  → { holdId, expiresAt }
POST /orders             { holdId, payment }    → { orderId, tickets }
POST /checkins           { ticketId, signature } → admitted | already_used

ticket_types(id, event_id, name, price, capacity, remaining)
holds(id, ticket_type_id, qty, expires_at)
orders(id, buyer_id, event_id, total, status, idempotency_key)
tickets(id, order_id, code, used_at)

Architecture

Architecture
Scale
Follow a request
◱Buyerweb / app◱Organizerdashboard◱Door scannercheck-in app◍CDNevent pages◍Waiting roomvirtual queue⇄Load balancer⚙Events & search⚙Inventoryholds⚙Check-in⚙Checkoutorders, payments☰Job queue↻Ticket deliverysigned QR◎PaymentsϟRedisholds + counts⛁PostgreSQLevents, orders◎Email & wallet

Step by step · Buy tickets

  1. 01Picks 2 general admission tickets
  2. 02POST /events/7/holds { qty: 2 }
  3. 03Creates a 10-minute hold
  4. 04Hold stored with TTL; count decremented atomically
  5. 05UPDATE … SET remaining = remaining - 2 WHERE remaining >= 2
  6. 06Buyer pays within the hold
  7. 07Charge with an idempotency key
  8. 08"Order paid" job
  9. 09Two signed QR tickets generated
  10. 10Tickets in the inbox and wallet

At this scale · 1M users

Built for on-sale spikes

  • ▸A waiting room lets buyers in at the rate inventory can sell
  • ▸Inventory service owns holds and counts; checkout owns payments
  • ▸Check-in service validates signed QR codes at the door, even offline

Tap any box to see what it does.

Deep dive: never oversell

Two buyers reading "1 left" at the same time and both buying is the classic race condition. Options, from simplest to most scalable:

TechniqueHowNotes
Conditional updateUPDATE … SET remaining = remaining - 2 WHERE id = ? AND remaining >= 2Atomic in one statement: if 0 rows changed, it's sold out
Row lockSELECT … FOR UPDATE then updateCorrect, but buyers queue on the lock during spikes
Holds with TTLReserve for 10 min; expired holds return to stockLets people pay without losing the tickets, keeps stock honest
Atomic counter in RedisDECRBY and give back if it goes negativeAbsorbs the spike in memory; the DB stores the final orders
Single writer per eventAll requests for one event go to one partition / actorSerializes writes on the hot event without global locks

How it changes with scale

Architecture
Scale
Follow a request
◱Buyerweb / app◱Organizerdashboard◱Door scannercheck-in app⚙App serverevents + orders◎Payments⛁PostgreSQLevents, orders◎Email & wallet

Step by step · Hot on-sale

  1. 01200K fans at 10:00 for 20K tickets
  2. 02Everyone hits the database at once: locks, timeouts
  3. 03"You have 10 minutes to complete your purchase"

At this scale · 100 users

A transaction protects the inventory

  • ▸Events, ticket types and orders in PostgreSQL
  • ▸Buying is an atomic UPDATE … WHERE remaining >= qty: no overselling
  • ▸Tickets emailed by the same app

Tap any box to see what it does.

UsersWhat you runWhy it changes
100Monolith + PostgreSQL with conditional updatesCorrectness is all you need
10KCDN + Redis holds, background jobs for ticketsPages and holds shouldn't hit the DB every time
1MWaiting room, inventory and checkout services, check-in serviceOn-sales concentrate traffic on single events
100M+Sharded by event, edge queue, bot protectionGlobal fans and resellers competing for the same seats

Key takeaways

  • 01Inventory must be strongly consistent: atomic conditional updates or a single writer per event.
  • 02Holds with a TTL let buyers pay without blocking stock forever.
  • 03A waiting room turns an on-sale stampede into a steady flow.
  • 04Signed QR tickets can be validated at the door, even with poor connectivity.

Check your understanding

1 of 3

In a ticketing system like Eventbrite, how do you never oversell tickets?

Security PlaybookNow attack it: threat-model this designFind the STRIDE threats in this architecture and pick the mitigations.↗