core practice · system design prompt
Hotel booking system
Design a hotel-room booking system: search availability for a date range, hold a room during checkout, finalize the reservation. Address concurrent bookers fighting for the last room.
The mechanism
Booking systems are about "holds" — a reservation is itself a write that blocks other people. Pick aggressive hold expirations, treat overbooking as a business policy (not a bug), and choose optimistic vs pessimistic locking based on how often collisions actually happen.
Expected evidence
Inventory model + hold/confirm flow + the consistency strategy (optimistic vs pessimistic).
Try this drill in the practice workspace →
Hints when you need them
- A hold is itself a write — model it.
- Expire holds aggressively (5-10 min).