Real-World Case Studies: Caching Patterns

✅ Source-checked. Each deep dive names its source, and we kept only what that source says. Found an error, or something the source doesn't support? Report it on the tracking issue.

Three cache designs: Facebook's TAO sits in the read and write path of the social graph, Netflix's EVCache keeps copies in every availability zone, and Bigtable layers two caches inside each server.


👥 Deep Dive 1: Facebook TAO, a Cache That Owns the Read and Write Path

Source: TAO: Facebook's Distributed Data Store for the Social Graph (Bronson et al., USENIX ATC 2013). Everything in this section comes from the paper.


🎬 Deep Dive 2: Netflix EVCache, a Replicated memcached

Sources: the EVCache README and wiki, and the Rend README, on Netflix's GitHub. Everything in this section comes from those pages.


🏢 Deep Dive 3: Bigtable, Two Cache Levels in Each Server

Source: Bigtable: A Distributed Storage System for Structured Data (Chang et al., OSDI 2006). Everything in this section comes from the paper.

"To improve read performance, tablet servers use two levels of caching":

Cache What it holds Helps when
Scan Cache The key-value pairs returned by the SSTable interface An application "tends to read the same data repeatedly"
Block Cache SSTable blocks read from the file system An application reads "data that is close to the data they recently read"

ℹ️ An earlier version of this page gave TAO a "99.8%" hit rate and "under 1 millisecond" reads and applied it to Instagram, expanded EVCache as "Elastic, Replicated, Clustered Memcached", and described RocksDB on NVMe at "one-tenth the cost" and probabilistic early expiration at Netflix. The sources above don't support any of that, so we removed it.

🎯 System Design Interview Takeaways

  1. Lookaside vs. owning the path. In a lookaside (cache-aside) design the application fills the cache on a miss. TAO instead puts the cache in front of every read and write, which lets it keep the cache and database in step.
  2. Tier your cache to keep each tier small. TAO's leader and follower tiers limit how many servers must talk to each other.
  3. Replicate across failure zones. EVCache keeps a copy per zone, so losing a zone doesn't empty the cache, and reads stay local.
  4. Cache at more than one level. Bigtable caches both decoded rows and raw disk blocks, because different access patterns benefit from each.