call(back)

Design a News Feed

Design the backend for a social news feed: following, posting, and a personalized timeline. Compare fan-out-on-write and fan-out-on-read, explain how you would handle accounts with millions of followers, and sketch where a ranking service fits in the read path.

Hints

Hint 1

Precomputing timelines is cheap for most users and ruinous for celebrities — hybrid fan-out exists for a reason.

Hint 2

Separate the storage problem (what happened) from the ranking problem (what to show first).

Asked at