Design Facebook’s Newsfeed

0%

Editorial Solution

Overview

System requirements

Functional

Capacity estimation

Traffic

API design

Feed Retrieval

Database design

PostgreSQL : Social Graph

High-level design

Write Path

Request flows

Post Creation Flow

Detailed component design

The GATE: Hybrid Fan-out Strategy

Trade-offs/Tech choices

Fan-out Strategy: Hybrid over Pure Push or Pure Pull

Failure scenarios/Bottlenecks

Redis Feed Cache Failure

Future improvements

Time Well Spent Optimization

Table of Contents

Overview

System requirements

Functional

Capacity estimation

Traffic

API design

Feed Retrieval

Database design

PostgreSQL : Social Graph

High-level design

Write Path

Request flows

Post Creation Flow

Detailed component design

The GATE: Hybrid Fan-out Strategy

Trade-offs/Tech choices

Fan-out Strategy: Hybrid over Pure Push or Pure Pull

Failure scenarios/Bottlenecks

Redis Feed Cache Failure

Future improvements

Time Well Spent Optimization

Overview

Design a personalized news feed system that aggregates posts from friends, pages, and groups, ranks them using ML models, and serves results in under 200ms to billions of users.

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock

Premium content

Unlock
Try this problem yourself

Reading a solution is not the same as producing one under interview pressure. Design it on the whiteboard and get scored feedback.

Asked in these interview guides

Company guides that list this problem among their sample questions.


Markdown supported

0%

Editorial Solution

Overview

System requirements

Functional

Capacity estimation

Traffic

API design

Feed Retrieval

Database design

PostgreSQL : Social Graph

High-level design

Write Path

Request flows

Post Creation Flow

Detailed component design

The GATE: Hybrid Fan-out Strategy

Trade-offs/Tech choices

Fan-out Strategy: Hybrid over Pure Push or Pure Pull

Failure scenarios/Bottlenecks

Redis Feed Cache Failure

Future improvements

Time Well Spent Optimization

Table of Contents

Overview

System requirements

Functional

Capacity estimation

Traffic

API design

Feed Retrieval

Database design

PostgreSQL : Social Graph

High-level design

Write Path

Request flows

Post Creation Flow

Detailed component design

The GATE: Hybrid Fan-out Strategy

Trade-offs/Tech choices

Fan-out Strategy: Hybrid over Pure Push or Pure Pull

Failure scenarios/Bottlenecks

Redis Feed Cache Failure

Future improvements

Time Well Spent Optimization