PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Amazon

Design a Scalable News Feed

Last updated: Aug 5, 2026

Quick Overview

Design a scalable home feed for a social product where users publish posts and follow other accounts. The discussion compares fanout strategies and examines durable publication, stable pagination, ranking, caching, privacy changes, deletion, recovery, and high-follower accounts.

  • easy
  • Amazon
  • System Design
  • Software Engineer

Design a Scalable News Feed

Company: Amazon

Role: Software Engineer

Category: System Design

Difficulty: easy

Interview Round: Technical Screen

# Design a Scalable News Feed ## Scenario Design the home-feed system for a social product. Users publish posts, follow other accounts, and request a paginated feed of posts from accounts they are allowed to see. The interview report names only a news-feed design, so begin by clarifying scale, ordering, privacy, deletion, and freshness requirements instead of assuming them. ### Part 1: Define requirements and the data model Establish a concrete contract for publishing and reading the feed. Identify the core entities and the information needed to enforce visibility and produce stable pages. #### What This Part Should Cover - Functional operations for publishing, following, unfollowing, deleting, and reading a feed. - Whether ordering is reverse chronological, ranked, or configurable. - Scale assumptions for users, follows, post volume, feed reads, and unusually popular accounts. - Models and identifiers for users, posts, follow edges, visibility, and feed entries. - A cursor contract that remains meaningful while new posts arrive. ```hint Start at the read boundary Treat privacy rules and pagination as part of the read contract, not as details to add after choosing storage. ``` ### Part 2: Design publication and fanout Trace a post from an accepted write to its appearance in eligible followers' feeds. Compare fanout on write, fanout on read, and a hybrid. #### What This Part Should Cover - The durable source of truth for a post and how a successful write emits fanout work. - Queue partitioning, retries, deduplication, and idempotent feed-entry creation. - The latency and storage tradeoffs of push and pull approaches. - Special handling for accounts with very large follower sets. ```hint Look for a workload split Use the difference between ordinary accounts and high-fanout accounts to test whether one strategy fits every write. ``` ### Part 3: Design feed reads, ranking, and caching Explain how a request obtains candidates, applies ordering, filters inaccessible content, and returns a stable next cursor. #### What This Part Should Cover - Candidate retrieval for both precomputed and read-time sources. - Ranking or reverse-chronological merge behavior and deterministic tie-breaking. - Cache keys, invalidation or freshness bounds, and protection from hot keys. - Stable pagination without returning the same item twice because new posts arrived. ```hint Make the cursor describe order A cursor based only on page number usually cannot describe a changing ordered feed reliably. ``` ### Part 4: Handle privacy changes, failures, and operations Describe what happens when content is deleted, a user blocks or unfollows another user, or a fanout worker fails. #### What This Part Should Cover - Enforcement of deletion, blocking, audience changes, and unfollow behavior. - Recovery from delayed, duplicated, or lost-looking queue work. - Rebuilding or backfilling feed state from authoritative data. - Metrics and alerts for publish-to-visible latency, stale feeds, errors, and queue lag. - The consistency guarantees visible to users. ```hint Recheck mutable policy Identify which checks must happen on every read even when feed entries were precomputed earlier. ``` ### What a Strong Answer Covers A strong design states its assumptions, keeps an authoritative post and relationship model, chooses fanout based on workload shape, and defines stable read semantics. It explains privacy and deletion behavior, not just the happy path, and connects retries, idempotency, observability, and rebuild procedures to explicit consistency goals. ### Follow-up Questions - How would the design change for a strictly ranked feed rather than reverse chronology? - What happens when a previously private post becomes public, or the reverse? - How would you prevent a popular account from overwhelming the fanout pipeline? - How would you verify that a rebuild produces the same visible feed as the live path?

Quick Answer: Design a scalable home feed for a social product where users publish posts and follow other accounts. The discussion compares fanout strategies and examines durable publication, stable pagination, ranking, caching, privacy changes, deletion, recovery, and high-follower accounts.

Related Interview Questions

  • Design a Scalable Metrics Monitoring System - Amazon (medium)
  • Design a Personalized Weekly Deals Service - Amazon (medium)
  • Design an Amazon Locker Service - Amazon (easy)
  • Architect an AI Chatbot for Enterprise Users - Amazon (medium)
|Home/System Design/Amazon

Design a Scalable News Feed

Amazon logo
Amazon
Jun 22, 2026, 12:00 AM
easySoftware EngineerTechnical ScreenSystem Design
0
0

Design a Scalable News Feed

Scenario

Design the home-feed system for a social product. Users publish posts, follow other accounts, and request a paginated feed of posts from accounts they are allowed to see. The interview report names only a news-feed design, so begin by clarifying scale, ordering, privacy, deletion, and freshness requirements instead of assuming them.

Part 1: Define requirements and the data model

Establish a concrete contract for publishing and reading the feed. Identify the core entities and the information needed to enforce visibility and produce stable pages.

What This Part Should Cover Guidance

  • Functional operations for publishing, following, unfollowing, deleting, and reading a feed.
  • Whether ordering is reverse chronological, ranked, or configurable.
  • Scale assumptions for users, follows, post volume, feed reads, and unusually popular accounts.
  • Models and identifiers for users, posts, follow edges, visibility, and feed entries.
  • A cursor contract that remains meaningful while new posts arrive.

Part 2: Design publication and fanout

Trace a post from an accepted write to its appearance in eligible followers' feeds. Compare fanout on write, fanout on read, and a hybrid.

What This Part Should Cover Guidance

  • The durable source of truth for a post and how a successful write emits fanout work.
  • Queue partitioning, retries, deduplication, and idempotent feed-entry creation.
  • The latency and storage tradeoffs of push and pull approaches.
  • Special handling for accounts with very large follower sets.

Part 3: Design feed reads, ranking, and caching

Explain how a request obtains candidates, applies ordering, filters inaccessible content, and returns a stable next cursor.

What This Part Should Cover Guidance

  • Candidate retrieval for both precomputed and read-time sources.
  • Ranking or reverse-chronological merge behavior and deterministic tie-breaking.
  • Cache keys, invalidation or freshness bounds, and protection from hot keys.
  • Stable pagination without returning the same item twice because new posts arrived.

Part 4: Handle privacy changes, failures, and operations

Describe what happens when content is deleted, a user blocks or unfollows another user, or a fanout worker fails.

What This Part Should Cover Guidance

  • Enforcement of deletion, blocking, audience changes, and unfollow behavior.
  • Recovery from delayed, duplicated, or lost-looking queue work.
  • Rebuilding or backfilling feed state from authoritative data.
  • Metrics and alerts for publish-to-visible latency, stale feeds, errors, and queue lag.
  • The consistency guarantees visible to users.

What a Strong Answer Covers Guidance

A strong design states its assumptions, keeps an authoritative post and relationship model, chooses fanout based on workload shape, and defines stable read semantics. It explains privacy and deletion behavior, not just the happy path, and connects retries, idempotency, observability, and rebuild procedures to explicit consistency goals.

Follow-up Questions Guidance

  • How would the design change for a strictly ranked feed rather than reverse chronology?
  • What happens when a previously private post becomes public, or the reverse?
  • How would you prevent a popular account from overwhelming the fanout pipeline?
  • How would you verify that a rebuild produces the same visible feed as the live path?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding 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.