Social Graph & In-Memory CachePRODUCTION RETROSPECTIVE

Meta / Facebook: TAO Graph Store, RocksDB Storage & WhatsApp Erlang Clusters

Architectures powering 3+ billion monthly users: TAO distributed social graph cache, RocksDB embedded log-structured storage, and WhatsApp’s 2.8M concurrent Erlang connection servers.

High-Level Architectural Overview

Meta structures its user domain as a graph of objects (nodes) and associations (edges). TAO (The Associations and Objects store) provides a geographically distributed, read-through cache layer over MySQL shards, handling billions of reads per second with eventual consistency.

Key Engineering Problems & Trade-Offs

TAO: Distributed Social Graph Cache

10+ billion reads/sec across master-follower geographically distributed tiers
The Scaling Problem

Serving billions of graph queries (friends, likes, comments, tagged media) with sub-millisecond latency over relational storage.

Engineering Solution

Two-tier cache hierarchy: Leader cache instances coordinate writes to MySQL shards; Follower cache instances satisfy localized reads with asynchronous invalidation.

Architectural Trade-Offs

Eventual consistency for association queries vs massive read throughput with sub-millisecond latencies.

How to Say This in an Interview

Describe social data as Objects (nodes with unique 64-bit IDs) and Associations (directed edges with timestamps and types) rather than flat relational tables.

WhatsApp: 2.8M TCP Connections on Erlang/FreeBSD

2+ billion users, 100+ billion messages per day with an engineering team of under 50
The Scaling Problem

Maintaining billions of persistent mobile WebSocket/TLS connections with minimal server footprint.

Engineering Solution

BEAM virtual machine lightweight processes (green threads) running on kernel-tuned FreeBSD network stacks.

Architectural Trade-Offs

Erlang functional language learning curve vs unparalleled per-box connection density (2M+ sockets per physical server).

How to Say This in an Interview

Explain why BEAM actor model processes take only ~300 bytes of memory compared to ~1MB OS thread stacks.

Curriculum Topics Used in Meta / Facebook Architecture (1)
Full Syllabus
Primary Technical Sources & Published Papers

Ready to Practice Meta / Facebook-Style Systems?

Start with foundational networking, compute, and storage, and build up to complex distributed consensus.

Start Free: Topic #1