Viral Deshle v1.0.0
Full Stack & GenAI Engineer · Webvoltz
~/Work/viral-portfolio
[*] [*] [*] · Hiring? Say hi at viraldeshle1234@gmail.com · /contact
/design
High-Concurrency Ticket Booking System · system design
Design a ticket booking system for a massively popular event (e.g., Coldplay concert) with millions of active users trying to book at the exact same time. The total booking window spans 3 hours, but actual tickets run out in mere minutes.
Client ──► Application Load Balancer
                  │
                  ▼
        App servers (horizontally scaled)
           │            │              │
           ▼            ▼              ▼
   Redis seat holds  DB read       Payment service
   (row-level locks) replicas           │
           ▲         (heavy reads)      ▼
           │                      Message queue
           │                            │
           └── release hold ◄── Consumers ──► DB (finalize tickets)
I laid out a High-Level Design (HLD) showing the flow:
1. A Frontend Client connecting through an Application Load Balancer (ALB).
2. Traffic routed to horizontally scaled Application Servers.
3. Row-level locks in Redis to temporarily hold/lock tickets out of the pool.
4. Database replicas handling the heavy read traffic.
5. A separate Payment Handling Microservice pushing transactions asynchronously into a Message Queue.
6. Consumer Services reading the queue to finalize ticket markings in the DB and unblock the holds from Redis once finalized.
Counter-questions
├─ How will events and seats exactly be fetched from the DB with the absolute correct status under such high load?
├─ How will you mitigate the massive read traffic spike specifically targeting the same single event?
└─ What happens to the DB transaction if someone attempts to lock a seat at the exact microsecond someone else is fetching it?
portfolio —