Design a News Feed
HardSystem design · Social · Meta · LinkedIn
Design a ranked news feed for a social app (Facebook-style). Users follow friends and pages, create posts, and open a feed of recent posts from them, ordered by predicted interest rather than strictly by time. Cover post fanout, the feed cache, ranking, pagination, and how deletes and privacy changes reach already-built feeds. Contrast with the Twitter timeline problem, which centres on a chronological home timeline. Out of scope: ads, media upload, and ML model internals.
Requirements
- Support users with very large follower counts without making one post stall everyone else
- Balance freshness, ranking quality and feed read latency
- Handle cursor pagination, deletion, privacy changes, follows and unfollows
- Discuss fanout, queues, feed cache sizing, ranking and consistency