Step 1 · The pattern
Hold the seat while they pay
A fan picks a seat and ticketing holds it (amber) while they pay, so nobody else can buy it. Most fans pay within a second or two and the seat is sold (green). There are 30 seats. (All numbers are illustrative, and time is compressed: real holds last minutes.)
- fan
- seat held
- sold
In short
Seat holds: how it works and how it breaks
When a buyer picks a seat for a concert, a flight or a limited product, the system holds it while they pay, so two people never buy the same seat. A hold takes the seat out of circulation. That is fine while holds are short and each buyer has one. When holds last a long time and an account can take as many as it likes, bots grab seats they never pay for, and real buyers are told "sold out" while most seats are held, unsold. OWASP calls this denial of inventory. Make holds short and let them expire, so unpaid seats return to the pool. Limit each account to one active hold, and make accounts costly to fake, for example with verified registration before the sale. The seats then go to people who pay.
What this simulation simplifies
- Time is compressed: holds last 3 or 12 seconds here, where real ones last minutes, and a whole sale fits in twenty seconds.
- The one-hold-per-account limit is drawn as a chance that a bot's attempt is refused, because bots reuse a small number of accounts.
- Each dot is one buyer taking one seat. Real buyers often take several seats in one hold.
How this comes up in interviews
"Design the checkout for a high-demand ticket sale. How do you stop two people buying the same seat, and how do you keep bots from hoarding seats?"
Then they ask
- How long should a hold last, and how do you pick the number?
- A payment succeeds just as its hold expires and the seat is given to someone else. How do you prevent that?
- Your dashboard says sold out but only half the seats are paid for. What do you check?
A strong answer covers
- Hold the seat atomically when it is picked, so it cannot be sold twice.
- Holds take stock out of circulation; make them short, expiring and visible to the buyer.
- Limit active holds per account, and make accounts costly to fake with pre-registration or verification.
- Confirm a sale only if its hold is still active, in the same transaction that marks the seat sold.
- Track free, held and sold separately, and alert when held stock stays high.
Points to cover, not a script. Say them in your own words and tie them to a system you have worked on.
On one page: the track cheat sheet.
Sources: OWASP Automated Threats to Web Applications: OAT-021 Denial of Inventory ↗ · OWASP Automated Threats to Web Applications: OAT-005 Scalping ↗ · NBC Chicago: Ticketmaster breaks down what happened during the Taylor Swift presale (2022) ↗ · Report a problem
Diagrams are our own simulations: the timings, rates and counts in them are illustrative, not measurements. Captions are original wording.