PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Machine Learning/Yelp

Design a News Feed with APIs

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system design, scalable API design, and machine-learning ranking competencies for personalized content delivery, focusing on ingestion, candidate generation, ranking, and operational guarantees.

  • hard
  • Yelp
  • Machine Learning
  • Data Scientist

Design a News Feed with APIs

Company: Yelp

Role: Data Scientist

Category: Machine Learning

Difficulty: hard

Interview Round: Onsite

Design a personalized news feed system that pushes items to users and also supports pull-based consumption. Requirements: 100M MAU, 1M publishers, 200k writes/s, 2M reads/s, p99 < 200 ms; support follow/mute/blocks, deduplication, diversity and freshness constraints, daily notification caps, and content retractions. Provide external API designs with request/response schemas and idempotency for: publish, subscribe/unsubscribe, get_feed (with pagination and consistent cursors), ack_consume, retract, and feedback logging. Choose between fan-out-on-write vs. fan-out-on-read and justify; describe storage (hot cache, cold store), event streaming, ranking feature pipeline, and online inference. Address abuse/spam controls, multi-region replication, backfill and replay, GDPR deletion, rate limiting, SLOs/observability, and failure modes (e.g., partial outages). Finally, outline how you would run online experiments on ranking while ensuring user-level traffic consistency and safe rollouts.

Quick Answer: This question evaluates system design, scalable API design, and machine-learning ranking competencies for personalized content delivery, focusing on ingestion, candidate generation, ranking, and operational guarantees.

Related Interview Questions

  • Design a Cold-Start-Aware Recommender - Yelp (hard)
Yelp logo
Yelp
Oct 13, 2025, 9:49 PM
Data Scientist
Onsite
Machine Learning
2
0

Personalized News Feed System Design (Push + Pull)

Context

You are designing a large-scale personalized news feed for a consumer application. The feed must support both push (server-initiated delivery/notifications) and pull (client-initiated fetch) consumption patterns, with strong ranking, safety, and operational guarantees.

Scale and Latency Targets

  • Users: 100M monthly active users (MAU)
  • Publishers: 1M
  • Ingestion: 200k writes/sec
  • Reads: 2M reads/sec
  • Latency: p99 < 200 ms for feed reads

Functional Requirements

  1. Social graph and controls:
    • Follow/unfollow
    • Mute and block (user-level and publisher-level)
  2. Feed quality:
    • Deduplication (exact and near-duplicate)
    • Diversity (content type/source/topic)
    • Freshness/recency constraints
  3. Push channel safeguards:
    • Daily notification caps per user
  4. Content lifecycle:
    • Content retractions (publisher-initiated takedown)

API Design Deliverables

Design external APIs with request/response schemas and idempotency for:

  1. publish
  2. subscribe (follow)/unsubscribe
  3. get_feed (pagination + consistent cursors)
  4. ack_consume
  5. retract
  6. feedback logging

For each, provide:

  • Endpoint path and method
  • Request and response JSON schemas
  • Idempotency strategy

Architecture Choices and Justification

  • Choose fan-out-on-write vs. fan-out-on-read (or hybrid). Justify with the given scale and SLOs.
  • Describe storage layers: hot cache/timeline store vs. cold storage.
  • Describe event streaming topology.
  • Ranking pipeline: candidate generation, features, filtering, scoring, re-ranking, and online inference.

Reliability, Safety, and Operations

  • Abuse/spam controls
  • Multi-region replication and read locality
  • Backfill and replay strategy
  • GDPR deletion and data lifecycle
  • Rate limiting and quotas
  • SLOs, observability, on-call signals
  • Failure modes and graceful degradation (including partial outages)

Experimentation

  • How to run online experiments on ranking while ensuring user-level traffic consistency across sessions and pagination
  • Safe rollout plans and guardrails

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Machine Learning•More Yelp•More Data Scientist•Yelp Data Scientist•Yelp Machine Learning•Data Scientist Machine Learning
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.