advancedTop 15 System Design Questions
Design a ticket booking system (Ticketmaster) that prevents double booking.
Seat inventory: Redis for real-time seat availability (SET seatId if NX = reserve) Seat lock: SET seat:{eventId}:{seatId} {userId} NX EX 300 (5-min hold) Seat visualization: Redis Bitmap for large venue (1 bit per seat) Booking: PostgreSQL for final ACID booking transaction Queue: Redis ZADD waitlist:{eventId} timestamp userId for sold-out events Event catalog: MongoDB for event details (venue, ar
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response