← Questions

Design Yelp: nearby business search and reviews

0
UberAppleSystem designLast asked May 2026

Design a local business review service like Yelp. Users find businesses near a location by category and rating, read and write reviews, and upload photos. Reads far outnumber writes.

Requirements

  • Functional: search businesses near a point or in a map area, filtered by category, rating, price and open now; business pages with details, ratings, reviews and photos; write and edit reviews; upload photos; business owners update their details.
  • Non-functional: low-latency search; read-heavy traffic; tens or hundreds of millions of businesses and reviews; new reviews visible within minutes; ratings resistant to fake reviews.

Clarifying questions

  • How many businesses, users and searches per second?
  • Is search by radius, by visible map area, or both?
  • How fresh must ratings and new reviews be?
  • How are results ranked: distance, rating, relevance?
  • Do we handle fake review detection in scope?

What a strong answer covers

  • A data model: businesses (with location), reviews, photos, users; average rating and review count kept on the business and updated as reviews arrive.
  • A geospatial index (geohash, quadtree or a search engine's geo queries) combined with filters, and why businesses, which rarely move, suit a precomputed index.
  • Search ranking from distance, rating, review count and text relevance; pagination.
  • Read scaling with caches for business pages and popular searches, read replicas, and a CDN for photos.
  • The write path for reviews and photos, moderation, and updating ratings and the search index asynchronously.
  • Fake review detection signals, and monitoring.

Follow-ups

  • Show only businesses open now, across time zones and holidays.
  • A business gets thousands of reviews in an hour after going viral.
  • Search a dense city center where a small radius holds thousands of results.
  • Personalize results for each user.
Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing