Design a low-latency hotel room availability service for a travel marketplace similar to Expedia.
The key requirement is low-latency availability reads. Users should be able to search for hotels and see available rooms quickly, but the system must also avoid showing rooms that are no longer available when the user tries to book. External hotel supplier APIs may be slower than the marketplace's latency target and may change availability independently.
Constraints & Assumptions:
- The marketplace aggregates inventory from many hotel chains and suppliers.
- Search traffic is much higher than booking traffic.
- Supplier APIs have variable latency and reliability.
- Availability can change outside the marketplace.
- A stale search result is tolerable only if the booking flow confirms availability before payment.
- The system should support popular cities, date ranges, room types, and cancellation/refund policies.
AI interview prep
Core dilemma
Balancing the need for extremely fast availability reads for search users against the imperative to maintain data freshness and avoid overselling when dealing with slow, unreliable, and independently changing external supplier APIs.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Design a low-latency hotel room availability service for a travel marketplace similar to Expedia.
The key requirement is low-latency availability reads. Users should be able to search for hotels and see available rooms quickly, but the system must also avoid showing rooms that are no longer available when the user tries to book. External hotel supplier APIs may be slower than the marketplace's latency target and may change availability independently.
Constraints & Assumptions:
- The marketplace aggregates inventory from many hotel chains and suppliers.
- Search traffic is much higher than booking traffic.
- Supplier APIs have variable latency and reliability.
- Availability can change outside the marketplace.
- A stale search result is tolerable only if the booking flow confirms availability before payment.
- The system should support popular cities, date ranges, room types, and cancellation/refund policies.