Question 3 of 30

Social News Feed

hardOpen designVery commonly asked~45 minHLD roundBar raiserSenior / SDE-3MetaGoogleAmazonFlipkartSwiggyStorage & Data ModellingCachingQueues & Async

The question, as asked

“Design the home timeline for a social app — the feed a user sees when they open it.”

Scope it before you design it

The prompt is vague on purpose. These are the clarifying questions a strong candidate asks first — answer them out loud before you touch the architecture.

  • Chronological or ranked? A reverse-chronological feed is a merge problem; a ranked feed adds a scoring pipeline and changes what you can cache. Settle this first — it reshapes the whole design.
  • Scale, in DAU and posts per day. You need both, because the feed is read-heavy but the *fanout* cost is driven by writes multiplied by follower count.
  • Follower distribution, not just the average. Ask about the biggest account on the platform — that single number decides whether pure fanout-on-write is viable at all.
  • How fresh must a post be? 'Within a few seconds' and 'within a minute' are different systems, and the looser answer buys you a lot.
  • Is the follow graph symmetric (friends) or asymmetric (followers)? Asymmetric means unbounded fan-out and celebrity accounts; symmetric caps it naturally.
  • What goes in a feed item — text, images, video? Media changes the storage and CDN story far more than it changes the timeline logic.
  • How far back can a user scroll? An infinite timeline and a 'last 800 posts' timeline have very different storage costs.

Your answer, first

Commit something before anything unlocks. Saved on this device as you go.

0 charactersExpand for room to draw

Framework hint

Sketch or write your approach above first. The hint gives you the structure, not the answer.

Go deeper