Back to sketch

SYSTEM DESIGN SKETCHBOOK / PRACTICE SHEET / NO. 16

Design a nearby places search

Intermediate · 35 min · Geospatial & marketplaces

People open a local discovery app and look for coffee, a pharmacy or dinner near where they stand, or around a pin they dropped on the map. They expect a ranked list of places within walking or driving distance and a map that fills in as they pan.

Requirements

  • Return places within a radius of a point (500 m to 25 km), optionally filtered by category and open now, ranked by a mix of distance and rating.
  • Return places inside the rectangle currently visible on the map.
  • Let business owners add or edit a place (name, location, category, hours); edits show up in search within 10 minutes.
  • Show a place detail page with address, hours and a rating summary.

Constraints and assumptions

  • 200 million places worldwide; about 100,000 places added or edited per day.
  • 100 million daily active users making about 5 searches each; peak traffic is 3× the daily average.
  • Search p99 under 200 ms at the server; return the top 50 results.
  • Density varies wildly: a downtown block can have 2,000 places within 500 m, while a rural search may find nothing within 20 km.

Out of scope for the first sketch

Writing reviews and uploading photos · Directions and routing · Ads in results · Full-text relevance beyond category and name prefix

Draw your design

Rough math and notes

Done on paper? Compare with the worked approaches