~learn.
0:00 / 1:25
W04 · Caching

Why LinkedIn builds your feed when you open it

transcript

Instagram mostly builds your feed before you open the app. LinkedIn builds it when you open it. Three words explain why.

Push first. When you post, its ID goes into every follower's feed cache. When they open the app, the feed is already built. One cache read.

Instagram users follow about 150 accounts. Mostly push. Twitter, around 200. Mostly push too. Facebook, around 300 friends. A hybrid. LinkedIn, around 500 connections. It pulls.

Here's why. LinkedIn shows posts from your connections. And posts they reacted to. John liked this. So a like isn't just a counter. It puts a post into feeds.

But here's the catch. With push, every like fans out to all of John's connections. And reactions happen far more often than posts. The write load multiplies.

So pull. When you open the feed, get your connections' posts. Then their recent reactions. The last 7 days, up to 100. Fetch those posts, merge, dedupe, and rank. Both paths? Keep the direct one.

TikTok pulls too. Its feed is algorithmic, and following plays a small part. Push suits feeds of posts. When every like is content, pull at read time.

Full breakdown in the lecture.