Meta (Facebook): TAO Distributed Graph Data Store
Query the social graph: Objects & Associations, TAO read-through cache tiers, Leader-Follower cache consistency, and MySQL persistent backing stores.
01.1. The Social Graph & The Limits of Memcached Lookaside
Facebook models its entire universe as a giant interconnected graph: users, pages, photos, comments, groups, check-ins, and friendships.
In Facebook's early days, this data was stored in sharded MySQL databases with a Memcached lookaside caching layer. While Memcached provided fast key-value lookups, it introduced severe architectural challenges at social scale:
- Lack of Graph Primitives: Memcached treats values as opaque byte blobs. Appending a new "Like" to a photo required fetching the entire serialized list from Memcached, modifying it in PHP, and writing it back, creating severe race conditions and write amplification.
- Thundering Herd & Cache Stampedes: When a viral post's cache expired, thousands of simultaneous PHP web servers queried MySQL directly, overwhelming database connection pools.
- Complex Invalidation Logic: Application code was responsible for maintaining cache consistency, leading to frequent bugs where stale cached data diverged from MySQL.
In 2013, Meta published the landmark paper: "TAO: Facebook’s Distributed Data Store for the Social Graph", replacing Memcached lookaside with a geographically distributed, graph-aware, read-through/write-through cache tier.
Meta TAO Distributed Social Graph Architecture 👥
Meta TAO Distributed Social Graph Architecture 👥
Two-tier caching hierarchy (Follower caches -> Leader caches -> Sharded MySQL) handling over 1 billion graph queries/sec.
Unlock Topic #262: Meta (Facebook): TAO Distributed Graph Data Store
You are viewing a preview. The full in-depth engineering deep dive, interactive simulators, architecture flowcharts, and self-assessment quizzes for this topic are available with Pro or Lifetime Access.
Failure modes, high-throughput bottlenecks, and real FAANG implementation decisions.
Interactive system topology diagrams, live parameter simulators, and downloadable SVG charts.
Staff-level multiple-choice quiz questions with instant feedback and answer explanations.
Firebase Google authentication automatically syncs your completed topics and quiz scores.
How clear and staff-actionable was this system breakdown?