Twitter's Fanout Strategy at Scale: The Trade-Off Most Designs Miss
Twitter's home timeline at scale uses a hybrid fanout strategy: fanout-on-write for normal users and fanout-on-read for celebrities, with a merge step at the edge to hide the seam. This design avoids the celebrity problem and cold-start issues that plague pure push or pull designs. To implement this, consider using a hybrid decision logic and a storage shape that can handle the load.