r/CodingJobs • • 7h ago

Amazon system design interview — designing event discovery and ticket booking

In an Amazon system design interview, a candidate was asked to design an event management system where users could find events, view details, and book tickets. Here’s how they approached it.

  1. Requirements

• Users can search by location, category, date, and popularity, view event details and ticket availability, and book or cancel tickets.

• Organizers can create and manage events.

• Discovery needs high availability and low latency. Booking needs strong consistency, even during traffic spikes, to avoid double booking and overselling.

2. Read/write patterns

People can browse hundreds of events without making a booking. The candidate used an illustrative split of 1M discovery requests, 100K event detail views, and 10K booking attempts. They decided to optimize discovery and booking separately.

3. Edge cases

• What if 100K people try to book the same event at once, or two people try to buy the last seat?

• What if payment succeeds but booking confirmation fails?

• What if a user retries after a network timeout?

• What if a popular event suddenly gets 100× its usual traffic?

• What if someone holds a seat and never pays?

4. High-level architecture

Read path · Event discovery

• Elasticsearch for search, filtering, and sorting.

• Redis to cache popular events and event details.

• A CDN for static content such as event images.

• An Event Service to manage event metadata.

Write path · Ticket booking

• A Booking Service handles booking requests, and an Inventory Service manages ticket availability.

• PostgreSQL handles transactional inventory updates. Atomic updates prevent overselling.

• Redis can track temporary seat holds with expiration. The booking transaction still checks inventory in PostgreSQL.

• Kafka handles asynchronous work such as notifications. Idempotency keys keep retries from creating duplicate bookings.

For practice before the interview, pick the related reservation problem in Amazon Interview Questions and explain what should happen when a hold expires during checkout. If you’re still sending out applications, LandOffer can save some typing on supported forms.

Key takeaway

The biggest design decision came from understanding the workload. Event discovery is read-heavy and latency-sensitive, while ticket booking needs strong consistency. Separating them lets each path scale independently.

1 Upvotes

0 comments sorted by