Software Engineering Architecture Lab

Caching Lab: Interactive Simulations & Lessons

Hit rates, TTLs, invalidation, stampedes and CDNs. A hands-on caching lab with 3 interactive simulations and 3 lessons.

Hit rates, TTLs, invalidation, stampedes and CDNs.

Caching is the cheapest performance win and the most common source of “but I just updated it!” bugs. Tune a cache, then break it.

Simulations

  • Cache: Hits, Misses, TTL & Invalidation — Serve product reads through a cache; tune TTL and size, update the database and watch stale reads and stampedes.
  • Load Balancing Algorithms — Send traffic through round robin, least connections, weighted and consistent-hash balancers; make one server slow.
  • Consistent Hashing Ring — Place keys on a hash ring, add or remove servers, toggle virtual nodes, and compare key movement with modulo hashing.

Lessons

  1. Caching: Speed at the Cost of Truth — Level 8 · Data Systems
  2. Facade & Proxy: Simple Front Doors and Smart Stand-ins — Level 4 · Design Patterns
  3. Replication Lag: When Your Own Write Disappears — Level 8 · Data Systems

Also explore

Other labs