News Feed
Build a personalized home feed that stays fast even when celebrities post.
Medium45 minFan-outCachingRanking
A news feed shows each user a list of recent posts from the people they follow, ranked and paginated. The central question is when to do the work of assembling feeds: at write time, at read time, or a mix, especially when some authors have millions of followers.
Clarify requirements
Functional
- Users create posts (text, optional media references).
- Users follow/unfollow others.
- Home feed: posts from followed accounts, newest or ranked first, paginated (infinite scroll).
- Out of scope: comments, ads, search, notifications (mention as extensions).
Non-functional
- 300M DAU, 1B total users; average 200 follows; some accounts have 50M+ followers.
- Feed load p99 < 300 ms.
- New posts appear in followers' feeds within a few seconds (eventual consistency is fine).
- Highly available reads; occasional staleness acceptable.
Try it first
Set a timer, sketch your own design on paper, then compare it with the reference walkthrough.
45:00
Defend it out loud
The AI interviewer will probe your design for News Feed and score it.