Design and scale a Yelp-like platform

Quick Overview

This question evaluates system design and engineering skills including data modeling, indexing, geospatial and full-text search, caching, replication and sharding for a high-scale reviews platform, together with key generation, storage layout, redirects, rate limiting and analytics for a URL-shortening service, probing the ability to balance scalability, consistency, availability, and operational complexity. It falls under the System Design / Distributed Systems / Databases domain and is commonly asked to assess architectural reasoning and trade-off analysis, testing both conceptual high-level design and practical implementation considerations such as performance, fault tolerance, and operational constraints.

Design and scale a Yelp-like platform

Company: Apple

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design a Yelp-like local-business reviews platform. Define the core data model (users, businesses with geocoordinates and categories, reviews, ratings, photos, check-ins, indexes). Explain how you would scale reads (replication, caches, CDN, search indexes) and writes (sharding, queues, consistency, backfills). Discuss search and geospatial queries, cache invalidation, and performance. Also outline a design for a URL-shortening service: key/ID generation and collision handling, storage layout, redirects and CDN usage, rate limiting, analytics, TTL/deletion, custom aliases, and strategies to scale high read/write traffic.

Quick Answer: This question evaluates system design and engineering skills including data modeling, indexing, geospatial and full-text search, caching, replication and sharding for a high-scale reviews platform, together with key generation, storage layout, redirects, rate limiting and analytics for a URL-shortening service, probing the ability to balance scalability, consistency, availability, and operational complexity. It falls under the System Design / Distributed Systems / Databases domain and is commonly asked to assess architectural reasoning and trade-off analysis, testing both conceptual high-level design and practical implementation considerations such as performance, fault tolerance, and operational constraints.

|Home/System Design/Apple
Apple logo
Apple
Sep 6, 2025, 12:00 AM
hardSoftware EngineerOnsiteSystem Design
8
0

System Design: Yelp-like Local-Business Reviews Platform + URL Shortener

You are designing two systems:

  1. A Yelp-like local-business reviews platform that supports millions of users, businesses with geocoordinates, categories, reviews, ratings, photos, and check-ins.
  2. A high-scale URL-shortening service.

Part A — Yelp-like Reviews Platform

Define and discuss:

  1. Core data model
    • Entities: users, businesses (with geocoordinates), categories, reviews, ratings, photos, check-ins.
    • Indexes for common queries.
  2. Scaling reads
    • Replication, caches, CDN, search indexes.
  3. Scaling writes
    • Sharding, queues, consistency (read-your-writes), backfills/migrations.
  4. Search and geospatial queries
    • Full-text, category filters, distance/radius queries, sorting.
  5. Cache invalidation and performance
    • What to cache, when/how to invalidate, pagination, hot keys, tail latency.

Part B — URL-Shortening Service

Outline a design covering:

  1. Key/ID generation and collision handling (sequential vs random, length analysis).
  2. Storage layout and data model.
  3. Redirects, HTTP status codes, and CDN usage.
  4. Rate limiting and abuse prevention.
  5. Analytics and aggregation.
  6. TTL/expiration, deletion, and alias reuse policy.
  7. Custom aliases and namespace management.
  8. Strategies to scale high read/write traffic (multi-region, cache, sharding).

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...