Fan-out on write timeline architecture supporting 500M tweets/day with celebrity account special handling and read-optimized caches.
Difficulty: advanced
Tags: social-media, fan-out, timeline, caching, gcp
Twitter's feed architecture solves one of the hardest problems in distributed systems: delivering 500M+ tweets per day to personalized timelines in real-time. Built on Google Cloud, the system uses a hybrid fan-out strategy — fan-out on write for regular users (pre-computing timelines into Memorystore Redis caches) and fan-out on read for celebrity accounts with millions of followers to avoid write amplification. Recommended for engineers designing social platforms where millions of users consume personalized content feeds in real time.