Forty Million Followers

Fan-out on write serves timelines at a comfortable p99 until an account with 40 million followers posts. Publishing takes several minutes, the fan-out queue backs up, and unrelated users stop receiving their notifications on time. What is the usual structural fix?

A

Move fan-out into the synchronous publish request so the work is finished before the response returns and no backlog can form

B

Exclude accounts above a follower threshold from write fan-out, merging their recent posts in at read time

C

Shard the inbox table by author id so that a single publish distributes its writes evenly across every shard

D

Raise fan-out worker concurrency until 40 million inbox writes complete inside the existing latency budget