In this lesson · topic 3 of 7
Topic 3
Push, pull and hybrid in the lab
8 min read
What the lab runs
Each tick, 20 posts are made by random authors and 100 readers open their feeds. Each user follows 20 accounts, picked by popularity with the skew you set.
In push mode a post is copied into every follower’s inbox. The writers can do 500 inserts a tick. Extra inserts wait in a backlog, and the lab reports how many ticks a post waited.
In pull mode a post is one write. A read fetches the latest posts of each followed account. In hybrid mode, accounts at or above a follower threshold are pulled and the rest are pushed.
Read time is modelled as 4 milliseconds plus 1.5 milliseconds for each fetch. The constants are invented to show shape. Real fetches overlap, so the real cost per fetch is lower.
Predict before you press play
Things to try
- Keep push mode and read the feed read time.
- In push mode, raise the follower skew to 15 tenths.
- Switch to pull mode.
- Choose hybrid at a skew of 15 tenths.
- Choose hybrid and lower the threshold to 50 followers.
The full-page lab has a guided experiment for each of these.