Lesson 5 of 15
43. Design Flash-Sale Ticket Booking (Ticketmaster / IRCTC Tatkal)

43.4 What do we store?

3 min read+10 XP
queue (in-memory store, Redis) sale_id → ordered list of account IDs; account → position admissions admission tokens: account, sale, expires_at (signed, so mostly stateless) seats (SQL, by section) seat_id, status (free | held | sold), hold_id, hold_expires holds hold_id, account, seats, expires_at, payment state tickets ticket_id, seat_id, account, issued_at

Interviewer pushback:

  • "Why seats by section?" → Holds for different sections never touch the same rows, so sections spread the write load; a buyer picks a section, and best-available search stays within it.

Memory code: "A token to wait, a token to enter, a hold to pay."