Limited Offer

30% OFF Lifetime Access ($139) with code SYSTEM30

TOPIC #238Advanced 10 min read

Design a News Feed System (Twitter / Facebook / LinkedIn)

๐Ÿ’ก
Core Architecture Summary

Generate personalized timelines: Fan-out on Write (Push) vs Fan-out on Read (Pull), Hybrid Fan-out for celebrity accounts, Redis timeline caching, and ranking.

Key Glossary Concepts in this TopicAll Glossary Terms

01.1. Functional & Non-Functional Requirements

A News Feed system aggregates, ranks, and serves a personalized stream of content (posts, photos, status updates) generated by the accounts, friends, and entities a user follows.

Functional Requirements

  1. Feed Publishing: A user can publish a text/image post.
  2. Feed Generation & Retrieval: A user can fetch a paginated list of the most recent and relevant posts from all accounts they follow.
  3. Follow Graph: Users can follow and unfollow other accounts.
  4. Ranking & Chronology: Support chronological ordering (Reverse-Chronological) and ML-ranked scoring (Engagement/Relevance).

Non-Functional Requirements

  • Ultra-Fast Read Latency: Feed retrieval must return the first page of 20 posts in < 20 ms (p99).
  • Scale: Support 500 million daily active users (DAU) generating 100 million posts/day and 10 billion feed page views/day.
  • Handling Celebrity Hotspots (The "Justin Bieber / Elon Musk Problem"): An account with 100M+ followers must be able to post without stalling the platform or creating multi-minute write latency lag.

Hybrid Fan-Out News Feed Generation Architecture ๐Ÿ“ฐ

PRO Architecture Blueprint

Hybrid Fan-Out News Feed Generation Architecture ๐Ÿ“ฐ

Pushing feeds into Redis Sorted Sets for standard users while dynamically merging celebrity posts on read to prevent write stampedes.

Hybrid Fan-Out News Feed Generation Architecture ๐Ÿ“ฐ
100%
Rendering visual architecture flowchart...
PRO & LIFETIME CURRICULUM

Unlock Topic #238: Design a News Feed System (Twitter / Facebook / LinkedIn)

You are viewing a preview. The full in-depth engineering deep dive, interactive simulators, architecture flowcharts, and self-assessment quizzes for this topic are available with Pro or Lifetime Access.

Production Deep Dive

Failure modes, high-throughput bottlenecks, and real FAANG implementation decisions.

Interactive Blueprints

Interactive system topology diagrams, live parameter simulators, and downloadable SVG charts.

Knowledge Assessment

Staff-level multiple-choice quiz questions with instant feedback and answer explanations.

Cross-Device Progress Sync

Firebase Google authentication automatically syncs your completed topics and quiz scores.

Rate This Architecture Chapter4.9 / 5.0 (38 ratings)

How clear and staff-actionable was this system breakdown?