Problems
#08Instagram News Feed
Ranked feed with cursor pagination. No `OFFSET`.
Saved on this device
Build the Instagram News Feed: a personalized, ranked, infinitely-scrollable list of posts from the people you follow, blended with recommended content. The product is **read-dominated** (≈ 60:1 read:write — feed-opens 350K QPS peak vs post-creates 5.6K QPS peak), **personalized per user** (no edge cache for ranked JSON), and **ranking-bound** (the model is the product — chronological feeds have 30% lower session length per Meta A/B disclosures). The architecture is a **two-stage retrieval funnel** (candidate gen + early-stage ranker → late-stage ranker), a **hybrid fanout** (denorm-on-write for normal users, pull-on-read for >100K-follower creators), and **cursor pagination** (no `OFFSET` — at depth 1000, offset is 17× slower per the standard cursor-pagination analysis).
This canonical is sized for ~1.5B DAU, derived from public Meta scale figures (Q4 2023 earnings; Mosseri 2021 IG MAU disclosure) and the published architectures it builds on: TAO (USENIX ATC '13), Memcache + leases (NSDI '13), Haystack/f4/Tectonic (OSDI '10/'14, FAST '21), the Instagram Explore recommender system (engineering.fb.com 2023), and Manhattan-style sharded counters (Twitter blog).
Reading: TAO: Facebook's Distributed Data Store for the Social Graph (USENIX ATC '13) · Scaling Memcache at Facebook (NSDI '13) · f4: Facebook's Warm BLOB Storage (OSDI '14) · Scaling the Instagram Explore Recommendations System (Engineering at Meta, 2023) · An Analysis of Facebook Photo Caching (SOSP)
ranking
two-stage retrieval
cursor pagination
fanout-on-write vs fanout-on-read
cache leases (anti-stampede)
sharded counters