System Design
Advanced

Design a Social News Feed

Design feed generation for regular users, celebrities, ranking, freshness, and read latency.

40 min
3 sections
feed
ranking
fanout
1
2
3

01. Compare fanout strategies

Section 1 of 3

Fanout-on-write precomputes feed entries when someone posts. Fanout-on-read computes the feed when a user opens it. Large systems often use a hybrid: push normal authors and pull celebrity or high-volume authors.

text
Hybrid feed:
- Regular author post: write post_id into follower inboxes.
- Celebrity post: store in author outbox only.
- Feed read: merge user inbox + celebrity outboxes + ads + recommendations.
- Rank: apply freshness, engagement, relationship strength, and blocks.
Back to Course