Two Thousand Queries Deep

A feed service assembles every request purely at read time. Users who follow around 2,000 accounts see p99 feed latency near four seconds, while users who follow 50 accounts load in 80 ms. What is the underlying problem?

A

Replication lag: the feed reads from follower replicas and blocks until the newest posts from every followed author have been applied there

B

Read amplification: each request fans out into thousands of per-author lookups, so tail latency tracks the slowest of many queries and grows with follow count

C

Write amplification: accounts with many followers generate a flood of timeline inserts, and those writes lock the rows each feed query has to read

D

Cold cache: the first request for any feed is computed from scratch, and users who follow thousands of accounts open the app too rarely to keep their entry warm in the cache