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
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
Design a ticket booking system (Ticketmaster) that prevents double booking.