Design an online booking system (e.g., for hotel rooms, meeting rooms, or appointment slots).
Requirements
Cover the following in your design:
-
Core flows
: search availability, create booking (reserve), confirm, cancel, modify.
-
Correctness
: prevent double-booking under high concurrency.
-
Scale
: support many users and a large inventory (properties/rooms/slots).
-
Latency
: fast availability queries.
-
Reliability
: handle retries, partial failures, idempotency.
Clarifications to address
-
What consistency guarantees are needed for availability and booking creation?
-
Do you need a “hold” (temporary reservation) with expiration?
-
How do you model inventory (per day, per time slot, per resource)?
Provide APIs, data model, and a high-level architecture, and discuss tradeoffs.