techdiagrams.net
← All templates

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.

Open in editor — free, no login Download JSON
CONSISTENCY CORE — ONE WRITER PER SEATstampede inadmit 200/shold 14B · lease+tokenchargecommit with token — stale holds rejectedpayment failed → release holdreap expiredconfirmed → ticket20k Fanson-sale at 10:00Waiting Roomadmits 200/s · fair orderBooking APIhold → pay → confirmHold Reaperexpired leases → back on saleSeat Holdslease 120s + fencing tokenSeat Inventorysource of truthPSPcharge within the leaseTicket DeliveryPDF + wallet passwhy fencing tokens:a browser that froze during paymentwakes with an EXPIRED hold — its commitcarries an old token and is refused.the seat already belongs to someone else

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

Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.