Proximity Service for Nearby Businesses is a system design interview question commonly asked by Amazon, focusing on backend, geolocation, web services, and scalability with machine learning elements for ranking.[1]
Design a proximity server that stores and reports distances to places like restaurants, enabling users to search for nearby businesses by distance, popularity, or other metrics. The system must handle data for hundreds of millions of businesses globally, supporting features like business CRUD operations (add, update, delete) by owners and efficient user queries for locations within a specified radius.[2][1]
No formal coding-style input/output formats exist, as this is a system design question. Instead, APIs are typically outlined:
Search API (GET /nearby)
{ lat: 37.7749, lng: -122.4194, radius: 500, category: "restaurant", sort: "distance" }[{ business_id: 123, name: "Italian Bistro", lat: 37.7750, lng: -122.4180, distance: 120m, rating: 4.5 }, ...] (top results within radius).[2]Business Management API (POST /business)
{ name: "New Cafe", lat: 37.7760, lng: -122.4200, category: "cafe" }{ business_id: 456, status: "created" }.[2]