Preparing your design workspace

Loading the problem and your latest saved attempt…

Map-Based Home Search Backend

Design a backend that searches home listings inside an arbitrary map rectangle with optional structured filters.

Problem statement

For this exercise, assume customers search for homes by supplying an arbitrary rectangular geographic area and optional filters for price range, listing status, square footage, bedroom count, and roughly fifty precomputed home characteristics.

Results should be pageable and stable enough for map browsing while listing updates become searchable within a bounded delay. Design the query contract, listing model, geospatial and attribute-filter execution, storage and acceleration boundaries, update propagation, and overload behavior.

Exclude map-tile rendering, recommendations, route distance, free-text search, and computing the characteristics themselves.

What to build

  1. A customer can search listings whose coordinates fall inside an arbitrary rectangular map area.
  2. A search can combine price, status, square footage, bedrooms, and selected precomputed characteristic filters.
  3. A customer can page through a deterministic result snapshot without duplicates during ordinary map interaction.
  4. Listing status and attribute updates become searchable within a bounded freshness interval.

At scale

  • For this exercise, assume peak map-pan traffic is 25,000 searches per second, ordinary browsing repeats substantially overlapping rectangles, and the first page should return within 300 milliseconds at the 95th percentile.
  • For this exercise, assume a dense rectangle may contain one million listings, each page returns at most 100 listings, and a request that would examine more than 100,000 candidates must return a refine-query or overload outcome.
  • For this exercise, assume listing updates may arrive out of order but a newer listing version must never be replaced by an older one, and committed status or attribute changes become searchable within sixty seconds.
  • For this exercise, assume a request may combine up to eight of roughly fifty sparse boolean or categorical characteristics in addition to the common numeric filters.