The Computing Series

Where It Fails

FM7 — Thundering Herd

A cache that serves 99% of reads suddenly expires. In the moment of cache miss, thousands of simultaneous requests hit the database. The database, which handles 100 req/s normally, receives 10,000 requests simultaneously. It becomes overwhelmed. The cache misses take longer than usual because the database is overloaded. The cache fills slowly. The overload persists. Solutions: staggered TTLs (add random jitter to expiration times), background refresh (refresh before expiry), request coalescing (only one thread fetches, others wait).

FM9 — Silent Data Corruption

A cache that is never invalidated returns stale data indefinitely. If the invalidation logic has a bug (a code path that updates the database without invalidating the cache), stale data accumulates silently. Users see outdated information. The system appears healthy — cache hit rates are high, database load is low. The staleness is invisible until a user reports incorrect data. Monitoring cache freshness (sample cache entries and compare to source of truth) is the detection mechanism.


Read in the book →