Duration: 60 minutes
Format: Collaborative system design discussion
Challenge: Design a booking management system based on the given requirements.
Design a basic booking management system for medical practices that allows users to search availability, reserve slots, book appointments, cancel appointments, and receive notifications.
- Users can search for availability by date and practice
- Users can reserve an appointment slot for a short duration
- Users can book the reserved appointment slot
- Users can cancel the booked appointment
- Users get confirmation and reminder notifications
- Consistency: High reliability on bookings, no double-bookings
- Availability: Highly available on read, writes must be consistent
- Latency: Low latency for search and availability
- Scale: Thousands of concurrent users and bookings
- Auditability: All booking actions must be auditable
- How do we prevent double-bookings, especially under concurrent requests?
- How do we keep search and availability low latency while the system scales to thousands of concurrent users?
- How should short reservation holds be modeled and handled when they expire or are released?
- How should we recompute or update availability when appointments or schedule rules change (e.g., new rules, canceled appointments)?
- How do we ensure notifications (confirmation and reminders) stay correct when appointments are updated or canceled?
- How do we provide a reliable audit trail for all booking-related actions (search, hold, book, cancel)?
- How do we handle time zones so that users book the correct slots regardless of their local time?
Clarify the five functional requirements:
- Searching availability
- Reserving slots
- Booking reserved slots
- Canceling appointments
- Sending confirmation and reminder notifications
Design an overall architecture that supports:
- Availability search
- Short-term reservation (hold) creation
- Booking workflow
- Cancelation workflow
- Notification triggering
Deep dive into the functional flows:
- How availability is searched
- How reservation holds are created and expired
- How a reserved slot becomes a booked appointment
- How cancellations are processed
- How confirmation and reminder notifications are generated
Discuss operational considerations for:
- Availability search
- Reservation expiration
- Booking operations
- Cancelation processing
- Notification delivery