LeetDesign
← All problems
Hard

Design a Social Feed

Serve a personalized home feed to millions. Every feed is different, so 0% of reads are cacheable — the problem where the database tier has to carry the whole flood itself.

Design the home feed for a social network: every open of the app fetches a timeline assembled for that one person, and people post and react all day.

The read volume is enormous — a hundred thousand feed fetches a second at the evening peak — and none of it is cacheable in any shared tier, because no two people see the same feed. There is no edge to hide behind and no hot set to pin in RAM: the storage tier itself must serve every read, while simultaneously swallowing a heavy stream of posts and likes under a no-lost-writes contract. Ranking and fan-out pipelines are out of scope; assume a feed read costs one storage round trip.