Try
↑ ↓ move↵ openesc close
In this lesson · topic 1 of 7
  1. 1. One post, a million timelines
  2. 2. Requirements, numbers, API and data model
  3. 3. Push, pull and hybrid in the lab
  4. 4. The celebrity problem
  5. 5. The hybrid and its threshold
  6. 6. Feed storage and pagination
  7. 7. The news feed in review

Topic 1

One post, a million timelines

4 min read

What a feed is

A reader opens the app and sees the newest posts from the accounts they follow, newest first. Reading is far more common than posting. A reader follows hundreds of accounts, and the same post appears in the feeds of everyone who follows its author.

So there is a choice. Do the work when the post is made, by copying it to each follower. Or do the work when the feed is read, by collecting posts from each followed account.

What the lab shows

In the lab, 1,000 users each follow 20 accounts. Follows are skewed toward a few popular accounts, so the most followed account had 972 followersmeasured. When follows were spread evenly the largest account had 35 followersmeasured.

The average account has the same number of followers either way. In the skewed case, one post from the top account was 972 insertsmeasured in push mode. With an even spread the largest post was 35 insertsmeasured.

The average hides the problem. The cost of one post is the follower count of its author. A skewed graph has a few authors whose posts cost a thousand times the average. This lesson is about that tail and about what to do with it.

Predict first

Follows become more skewed, with the total number of follows unchanged. What happens to the average number of feed inserts per post in a push feed?

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms