Design a News Feed
How the interviewer asks it
“Design the feed for a social app: users follow others, post text and images, and open a ranked feed.”
Want the full answer? Watch lesson 7 of the free system design course: a 20-minute video walkthrough of this question.
Typed drills are free and unlimited: the AI scores your answer against the outline below.
What the interviewer is looking for
- You explain fan-out on write (precomputed feeds) and fan-out on read (merge at request time) and when each wins.
- A hybrid for accounts with millions of followers.
- Feed storage as lists of post ids in a cache, hydrated with post data on read.
- Ranking kept separate from retrieval, and cursor-based pagination.
How to structure your answer
- 01
Requirements
Post, follow, read a feed of recent posts from followed accounts, ranked. Feed loads fast; a post can take seconds to appear.
- 02
Estimates
Daily active users, posts per day, average followers and the tail (some accounts have tens of millions).
- 03
Write path
Store the post, then a fan-out worker appends its id to each follower's feed list in the cache.
- 04
Celebrities
Skip fan-out for accounts above a follower threshold; merge their recent posts in at read time.
- 05
Read path
Read the precomputed id list, merge celebrity posts, rank, hydrate from the post cache, return a page with a cursor.
- 06
Media and storage
Images in object storage behind a CDN; posts in a store partitioned by author.
Best answers from candidates
No candidate answers yet. Type yours, and if it scores 6 or more you can show it here without your name.
Answers are shared by candidates, without names, after a privacy check. Add yours
Common mistakes
- Choosing pure fan-out on write and not noticing the celebrity case.
- Storing full posts in every follower's feed instead of ids.
- Offset pagination, which shifts as new posts arrive.
Follow-up questions to expect
- A celebrity with 50 million followers posts.
- How would you add ads every ten posts?
Now answer it out loud
Max will ask you this exact question, listen to your answer, push on the weak spots with follow-ups like the ones above, and score you when you finish.
Practice with MaxFree: a 5-minute voice round and unlimited typed drills, with scored feedback. No card, and your camera is never recorded.
More system design interview questions
Preparing for this round? Read how to practice for a system design interview.