Design Ticketmaster
hard 55 minSell numbered seats to far more people than there are seats.
Explain your choices
Answer first. Then compare your reasoning.
12 questions 0 got it 0 to review12 not marked
Decisions
| Decision | Choice | Because | Price |
|---|---|---|---|
| Hold in Redis or row | Row | 83 a second, one truth | Slower than memory |
| Wait or open door | Waiting room | 280 people for each seat | People wait |
| Arrival or shuffle | Shuffle the lobby | Speed wins nothing | Some dislike chance |
| Map fresh or cheap | A second old | One picture for all | Lost clicks |
| Charge or authorise | Authorise first | No money without a seat | Two provider calls |
| Keys in cache or database | Database | They must outlive retries | About 250M small values a year |
| Shard by what | Event | A hold stays local | My orders need a copy |
When they push back
| They say | Answer with |
|---|---|
| "A database cannot take this." | "Not 1.5 million a second. It sees 83 holds and 28 orders, because the door is in front." |
| "Why not a distributed lock?" | "It can forget, and the row must decide anyway. I add it as a filter if tries reach thousands a second." |
| "Your line is only a nicer error page." | "It keeps places and lets all seats sell. The other choice is a crash that sells none." |
| "Serializable everywhere?" | "It works. I check row counts instead and avoid retries." |
| "Ten minutes is long." | "It is a number per event. Shorter sells faster and loses slow payers. I would measure abandoned holds." |