RETURN TO SYSTEM DESIGN VAULT (55)BLUEPRINT #15 // Medium
#15MediumHigh-Concurrency Feeds & Social

Design Facebook's News Feed

ASKED IN INTERVIEWS AT:Meta

EXECUTIVE SUMMARY & PROBLEM STATEMENT

Architect Facebook's personalized News Feed engine combining real-time edge aggregation, ranking algorithms, and hybrid fan-out for billions of active users.

SCALE ESTIMATION & TRAFFIC ENVELOPE

DAILY ACTIVE USERS / TPS2 Billion DAU
READ / WRITE TRAFFIC RATIO100:1 read-to-write
5-YEAR STORAGE CAPACITYPetabytes of feed graph edges stored across TAO cache

FUNCTIONAL REQUIREMENTS

  • [1]Generate ranked feed of posts from friends and followed pages
  • [2]Support status updates, images, and video posts

NON-FUNCTIONAL REQUIREMENTS

  • •Feed retrieval latency < 150ms
  • •Zero stale feeds after refresh
  • •Fault-tolerant fallback to chronological feed on ML timeout

CORE ARCHITECTURAL COMPONENTS

Feed Publishing Service
Fan-out Queue
ML Scoring Engine (Edgerank / Deep Ranking)
Feed Cache (Redis / Memcached)
Graph Data Store (TAO)

DATA SCHEMA & PERSISTENCE

TAO Graph Model: Objects (Users, Posts) and Associations (Follows, Authored, Liked)

DISTRIBUTED TRADE-OFFS & FAILURE MODES

  • ⟡Pre-computing top 500 ranked post IDs per user into memory caches vs computing feed ranking on-demand on every request.