Find the flawTicket booking
Two fans, one last seat
Last seat. Two fans click Buy in the same millisecond. Your checkout checks the seat is free, then sells it. What happens and how do you fix it?
The design you’re given
- Buyer app → Booking service: POST /book
- Booking service → Seat status in Redis: read the status, then write "held"
- The gap between the read and the write is only a few milliseconds