Ticket booking with seat holds
On-sale day without oversells: a waiting room levels the stampede, seats are held with leases plus fencing tokens, and payment failure releases the hold via saga compensation.
What this design does
Ticketing is the pessimistic-locking poster child: two fans must never buy seat 14B, which means holds, not hope. This design admits the stampede through a waiting room at a survivable rate, grants each admitted buyer a seat hold with a 120-second lease and a fencing token (so a zombie session that wakes up late is rejected, not honored), and treats hold→charge→confirm as a saga — a failed payment compensates by releasing the seat back to inventory automatically.
The patterns it composes
- Queue-based load leveling (waiting room) — on-sale traffic admits at a rate the core can survive
- Pessimistic lock + lease — a hold is exclusive but self-expiring — abandoned carts free themselves
- Fencing token — stale clients holding expired leases get rejected at commit
- Saga + compensation — payment failure releases the hold — no manual seat cleanup
- Timeout + retry budget on PSP — the charge is bounded; the lease outlives the worst retry
Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.