Design Vacation Rental Listing Search
Design a low-latency listing search service that combines destination, dates, filters, availability checks, ranking, and fresh marketplace updates.
Problem statement
For this exercise, assume travelers search a vacation-rental marketplace by destination or map area, travel dates, guest count, and a bounded set of price and amenity filters. The service returns ranked listing summaries with stable cursor pagination.
A derived search index may lag marketplace updates, but before returning a page the search path must remove candidates whose authoritative calendars currently conflict with the requested stay.
The reservation system owns calendar truth; creating bookings, payments, recommendations, messaging, reviews, and host payouts are outside scope. Hosts and the reservation system publish versioned listing, price, and availability changes that should become searchable within a bounded delay.
Explain the query journey, data ownership, indexing and ranking, range-availability checks, caching, update propagation, overload behavior, and recovery.
What to build
- A traveler can search by destination or map area, stay dates, guest count, price, and bounded amenity filters.
- The service returns relevant listing summaries in a deterministic ranked order with stable cursor pagination.
- Before returning a page, the service removes candidates whose authoritative calendars conflict with the requested date range.
- Versioned listing, price, and availability changes become searchable within the freshness target without older events regressing state.
At scale
- For this exercise, assume 10 million active listings, 5,000 searches per second normally, and 25,000 searches per second at peak, with traffic heavily skewed toward popular destinations.
- For this exercise, assume common first-page searches should complete within 400 milliseconds at p95, return at most 50 listings, and keep the service available for 99.95 percent of requests.
- For this exercise, assume listing, price, and calendar updates may arrive late, duplicated, or out of order, but 99 percent of accepted updates should affect new searches within 60 seconds and older versions must never overwrite newer state.
- For this exercise, assume a search index may be stale, but every returned listing must pass a batched authoritative availability check for the requested half-open date range at response time; the response does not reserve inventory.