System design interview questionHardSocial / Feed

Design a News Feed like Twitter or Facebook

Design Twitter/Facebook-style news feed: users post, followers see a personalized timeline quickly.

Interview scope

Client β†’ Gateway/LB β†’ App β†’ Cache + DB; Message Queue for fan-out/async. No Client β†’ DB/Cache.

Functional requirements

  • Create a post.
  • Read a home/timeline feed for a user.
  • Handle follow relationships at a high level.

Scale and quality goals

  • Feed reads must be fast (cache-friendly).
  • Publishing to many followers should use async fan-out where needed.
  • Don’t rebuild the whole feed from raw posts on every scroll with no cache.

Capacity assumption

Design for this scale

Assume ~100M DAU, ~2 posts/user/day, feed reads >> writes. Celebrity fan-out is the hard part.

Practice more than a diagram

Place components on the Froquiz canvas, connect the data flow, and see which decisions the scenario-specific review finds missing. The full exercise and review unlock with Premium.

Explore Premium β†’