Lesson 14 of 15
13. Caching at Scale

Sources

3 min read+10 XP

Source notes

  • Leases to prevent thundering herds and stale sets: Rajesh Nishtala et al., "Scaling Memcache at Facebook", NSDI 2013.
  • Probabilistic early expiration: Andrea Vattani, Flavio Chierichetti and Keegan Lowenstein, "Optimal Probabilistic Cache Stampede Prevention", Proceedings of the VLDB Endowment, 2015.
  • Redis Cluster: 16,384 hash slots, CRC16 key hashing (reference value 0x31C3 for "123456789"), hash tags, replicas and failover: Redis Cluster specification and documentation. Redis INFO fields and hot-key reporting with LFU eviction: Redis documentation.
  • HTTP caching (Cache-Control, ETag, 304, Vary): RFC 9111 and RFC 9110. stale-while-revalidate: RFC 5861.
  • All traffic and sizing numbers are illustrative assumptions; arithmetic computed 2026-10-08.
  • Level 3 and Level 4 code: tested 2026-10-08 (code/ch13_cache_at_scale.py, all checks pass).