P

PrepStack

"Case Study: News Feed"

A news feed (the home page that lists the latest posts from the people you follow) is read far more often than it is written, so the question is when to do the work: when someone posts, or when someone opens the app. This note builds one design from stated assumptions, not "the" answer. The central trade-off is copying each post to every follower against collecting posts at read time, and what to do about accounts with millions of followers. The numbers are examples worked out with a short program, not real company figures. After this note you can size the system and explain the hybrid rule.

Topics in this section