Yelp

Design Yelp — a local business search and review platform that returns nearby, filterable business results ranked by relevance and rating.

00

Practice checkpoints

The requirements are open as a taste. From the numbers onward, the full guide opens in the app.

  1. 01
    Clarify scope
  2. 02
    Requirements + scale
  3. 03
    API + data modelUnlocks in the app
  4. 04
    Draw architectureUnlocks in the app
  5. 05
    Deep diveUnlocks in the app
  6. 06
    Trade-off decisionUnlocks in the app
01

Requirements that shape the design

Do not only state requirements. Ask for them. Each card pairs the design constraint with a clarification question you can say out loud before drawing the architecture.

Functional requirements

01What can a user search by — name, location, category, or all three at once?

Search businesses by any mix of name, location, and category, ranked and answered in under 500 ms.

02What does tapping a result actually show?

Opening a business shows its profile, hours, aggregate star rating, and its reviews.

03Can the same user review a place twice?

One review per user per business — 1 to 5 stars plus text; writing again edits the existing review instead of adding a second.

04I leave a 5-star review — when do the stars move?

A new review moves the business’s star rating on the very next read — freshness comes from counters updated at write time, not from recomputing at read time.

05Is “open now” decoration, or a filter I can trust at 11:58 pm?

Open-now is a real filter: hours are evaluated against the query timestamp in the business’s own timezone, never a precomputed flag.

06Thai food, 4 stars and up, open now, within 2 km — one query or four?

Filters combine in one query — category, minimum rating, open-now, and radius together, not as separate round trips.

Out of scopeAdmin-side business CRUD and owner onboarding · Map tile rendering (we return results; the map is a client concern) · Personalized recommendations — ranking here is query relevance, not taste

Non-functional requirements

01What is the latency budget for one search?

p99 under 500 ms end to end — geo lookup, filters, and ranking all inside it, which rules out any per-query table scan.

02What is the read-to-write ratio, and what does it buy us?

Roughly 1,000 reads per write — so the read path gets caching and precomputation, and the write path is allowed to be a boring transactional insert.

03Two “first reviews” from one user race — who wins?

Exactly one review lands under concurrency: uniqueness is enforced by a database constraint at insert time, not by an application check that two requests can both pass.

04Can the star rating ever drift from the actual reviews?

Stars never disagree with reviews: rating_sum and rating_count update in the same transaction as the review insert; the search index may lag seconds, the source of truth never drifts.

05Does a hot city degrade everyone sharing its infrastructure?

A Manhattan lunch rush cannot slow a rural search: hot cells are isolated by caching and finer partitioning, so dense-city load never queues into everyone else’s latency.

Keep asking — the interview is a conversation

Real interviews probe far more than a tidy list. These are the scope questions that separate candidates who interrogate the problem from those who recite it.

  • When relevance and distance disagree — a perfect match 5 km away versus a decent one next door — which should win?
  • How fast must a brand-new review show in search results — the same second, or is a few seconds of index lag fine?
  • Should “open now” follow the business’s timezone even when the searcher is traveling — I’ll assume yes?
  • Can a user edit their one review, and does the edit re-run the rating math (subtract old stars, add new)?
  • Do we know the traffic skew across cities, or should I design assuming a Manhattan-sized hot zone from day one?
01

Unlock the full playbook for Yelp

Numbers, architecture diagram, API and data model, deep dives, expected topics, self-check, whiteboard starter, and common mistakes unlock inside the app.

02

Numbers that force architecture decisions

Locked in the app

03

Architecture path

Locked in the app

04

API and data model

Locked in the app

05

Deep dive directions

Locked in the app

+Series

Practice the related series