Design a social news feed
mediumComplete guide with examples and interview questions · 40 min
Say it out loud in an interview — clear, simple, no textbook wording.
If someone asks me to design a news feed, I would say it is a ranked list of posts that loads in pages and renders only what is on screen. The hard parts are not the post cards. They are pagination that survives new posts, scroll that stays stable, and rendering that stays fast at thousands of items.
Interviewers care because a feed touches almost every frontend skill at once. Data fetching, list rendering, caching, realtime updates, and performance all show up in one question. A candidate who jumps straight to the card layout has missed the question.
The senior nuance is restraint. A feed should not jump, should not duplicate, and should not re-render the world on every new post. Most of the design is about what you refuse to do to the user's scroll position.
Key takeaways
- •A feed is a ranked, paginated list, not a timeline dump
- •Cursor pagination beats offset pagination once items insert at the top
- •Virtualized rendering is what keeps a long feed fast, not smaller payloads
- •New posts arrive as a "new posts available" affordance, never as a silent jump
- •Rank, dedupe, and read state are frontend jobs even when the server helps
Track your mastery
Sign in to save Q&A scores, coding challenge progress, points, and streaks across devices.
Sign in to save progress