Booking Waitlist System Design (Fair Queuing & Notifications)
Scenario
When inventory is gone, users join a waitlist; when a slot frees, the next eligible person gets a time-limited offer to pay or confirm. The system must never give the same released slot to two people, must notify reliably, and must recover when workers crash mid-offer. This is workflow + queue + booking coordination—not a single “list” in Redis without states.
Design a waitlist service that queues users when a resource is full and automatically offers openings when they become available.
Constraints
Join waitlist; leave waitlist; notify on offer; accept/decline within deadline; optional payment step; admin visibility
No double booking of the same released slot; durable notifications; explainable user state
Many concurrent events; bursts when cancellations happen in bulk