Design a location-based radius top-K search

Quick Overview

This question evaluates system-design and backend engineering skills, focusing on geospatial data modeling, indexing and query strategies, sharding and partitioning, handling static versus dynamic location updates, and high-level capacity and latency estimation for throughput-sensitive services.

Design a location-based radius top-K search

Company: Meta

Role: Software Engineer

Category: System Design

Difficulty: easy

Interview Round: Onsite

Design a location-based search service. Input: - `latitude`, `longitude` - `radius` (meters) - `K` Output: - The top K locations within the radius. The term “location” is generic and can represent: - **Static** locations (e.g., businesses/POIs like a Yelp listing) - **Dynamic** locations (e.g., nearby drivers in a ride-hailing app) that update frequently Discuss: - Data model and APIs - How to index/query efficiently (e.g., geohash, quadtree, or alternatives) - Trade-offs for static vs dynamic data - Sharding strategy (including hybrid approaches) - How you would estimate memory/throughput at a high level Assume global scale and low-latency queries.

Quick Answer: This question evaluates system-design and backend engineering skills, focusing on geospatial data modeling, indexing and query strategies, sharding and partitioning, handling static versus dynamic location updates, and high-level capacity and latency estimation for throughput-sensitive services.

|Home/System Design/Meta
Meta logo
Meta
Mar 11, 2026, 12:00 AM
easySoftware EngineerOnsiteSystem Design
33
0

Design a location-based search service.

Input:

  • latitude , longitude
  • radius (meters)
  • K

Output:

  • The top K locations within the radius.

The term “location” is generic and can represent:

  • Static locations (e.g., businesses/POIs like a Yelp listing)
  • Dynamic locations (e.g., nearby drivers in a ride-hailing app) that update frequently

Discuss:

  • Data model and APIs
  • How to index/query efficiently (e.g., geohash, quadtree, or alternatives)
  • Trade-offs for static vs dynamic data
  • Sharding strategy (including hybrid approaches)
  • How you would estimate memory/throughput at a high level

Assume global scale and low-latency queries.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...