How Facebook Serves Personalised News Feeds to 3 Billion Users in 300ms

Facebook's News Feed must load a unique, personalised content stream for over three billion users in under 300 milliseconds, a challenge that required building one of the most complex distributed systems in existence. To manage social connections at scale, Facebook developed TAO, a geographically distributed graph database that stores users, posts, and relationships as nodes and edges, enabling social graph traversal in microseconds without costly database joins. Delivering new posts to friends involves a tradeoff between Fan-out on Write, which pre-populates friends' caches instantly, and Fan-out on Read, which assembles the feed on demand. The push model works well for ordinary users but breaks down for celebrities with hundreds of millions of followers, where a single post could trigger massive simultaneous writes — a problem known as the Thundering Herd. Facebook resolved this with a hybrid fan-out architecture that applies different delivery strategies depending on a user's follower count.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in