Lesson 14 of 15
37. Design a News Feed

Sources

3 min read+10 XP

Source notes

  • Fan-out on write with special handling for high-follower accounts: Raffi Krikorian (Twitter), "Timelines at Scale", QCon San Francisco 2012 (see Chapter 23).
  • Early public description of feed ranking as affinity × weight × time decay: Facebook's "EdgeRank", as presented at f8 in 2010 and widely reported. Modern feeds use learned models.
  • Time-sortable IDs: see Chapter 10.
  • All user, follower, post and read numbers are interview assumptions agreed in Step 1, not figures for any real app. Arithmetic computed 2026-10-08.
  • Fan-out arithmetic, ranking order and snapshot pagination: tested 2026-10-08 (code/ch37_news_feed.py, all checks pass).