Design Distance-Ranked Local Search for Facebook Marketplace Listings

Last updated: November 29, 2026

Quick Overview

Design the search backend that lets Facebook Marketplace buyers find listings within a chosen radius of their location, filtered by category and price, ranked by a mix of relevance and distance.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the search backend that lets Facebook Marketplace buyers find listings within a chosen radius of their location, filtered by category and price, ranked by a mix of relevance and distance.

Marketplace is inherently local, so its search infrastructure blends text search with geo filtering. The interviewer checks a geo-sharded or geo-indexed design, efficient radius filtering, freshness for new and sold listings, and ranking that balances distance with relevance.

What the Interviewer Expects
  • Index listings by location using geohash, S2 cells, or a geo-aware search index
  • Translate radius queries into cell coverings and post-filter by exact distance
  • Combine text relevance, distance, recency and seller quality in ranking
  • Keep the index fresh when listings are created, edited or sold
  • Handle dense cities versus sparse rural areas
Key Topics to Cover
S2 cells
geo index
radius queries
hybrid ranking
index freshness
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you return results for a rural user when the 10-mile radius has three listings?
  • How would you support listings that offer shipping nationwide?
  • How do you protect sellers' exact addresses?
  • How would you shard the index geographically?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: query has text (optional), category, price range, buyer location and radius (1 to 500 miles). Return paginated listings ranked by relevance with distance shown. New listings appear wit...

High-Level Design

Listing service writes to a primary store and emits change events. An indexer consumes events and updates a search index (an inverted index like Meta's Unicorn-style systems) where each listin...


Submit Your Answer
Markdown supported