1,000 users each follow 20 others, and most follow 2 celebrities. Build feeds by push, pull or a mix, then let a celebrity post, and compare reads, copies and delays.
Feed store — a feed per user — healthy — 271 copies written
Feed service — Push — healthy — 1.0 reads per load
Reading users — 20 loads/s — healthy — 30% of users active
New post
Copies queued
Copies written
Feed opened
Database read
Feed shown
Reads per feed load
1.0
Feed load time
13 ms
illustrative: 10 ms + 3 ms a read
Copies written
94/s
Fan-out backlog
0
copies waiting; 0 posts not yet everywhere
Slowest post delivery
0.14 s
normal posts finished in the last 5 s
Copies for users who never read
70%
Watch: last 5 s
Numbers add up:271 copies queued = 271 written + 0 waiting; every stored feed holds only posts by accounts its user followsThe lab checks this sum as it runs, so a counting mistake would show here.
Controls
Fan-out backlog (copies waiting)
012.52537.5501s2s3s
Show data table
Time
Backlog
1s
30
1s
0
2s
0
2s
0
3s
0
3s
7
Copies written per second
0501001502001s2s3s
Show data table
Time
Copies/s
1s
35
1s
121
2s
142
2s
56
3s
15
3s
87
What just happened
Nothing yet. Start traffic or run an experiment.
What this model simplifies
1,000 users, each following 20 others at random. Real follow graphs are far more uneven, with many accounts in between normal users and celebrities.
Celebrities post only when you press the button. A pulled feed reads each followed account once; real systems cache those reads.
Feed load times are illustrative: 10 ms plus 3 ms per database read. Real pull reads run side by side, so the true cost is database load and slow outliers more than adding up.
Push copies a post to every follower. Real systems skip followers who have not logged in for a while, and keep only the newest few hundred posts in each feed.