Requirements


Functional Requirements:


  • Users can see available shows.
  • Users can view a seating map to pick seats.
  • Users can choose their desired seats, make an order and pay for tickets
  • Users can choose different level of tickets and pricing will be different
  • Users can cancel tickets according to the cancellation policy
  • Users can modify bookings (changing seats, upgrading) according to the change policy
  • The system sells exactly the amount of tickets for an event



Non-Functional Requirements:


  • 10-20 million DAU
  • Peak QPS to be between 100k to 1 million
  • SLA 99.9%
  • Backup systems and recover quickly from outages
  • Should be able to scale horizontally
  • Monitoring for: number of tickets sold per second, number of failed purchases, number of failed payment,
  • Alarm: Spike in number of failed purchases or number of failed payment


API Design

Get /v1/events: show available events

Response:

{

"events": [

{

"eventId": 1


GET /v1/events/{eventId}/seatmap: show seatmap for specific event


POST /v1/events/{eventId}/booking



High-Level Design

Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.





Detailed Component Design

Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.