Interview Prep/SRE & Reliability/Reliability Patterns in Production

Redis restarted and immediately the database CPU hit 100% and the site went down.

AdvancedTroubleshootingReliability Patterns in Production
Answer

Likely causes → Cache stampede: all cache misses at once sent the full read load to the database, which was sized only for the cache-miss rate.

Diagnose → Correlate cache hit ratio, DB QPS and DB CPU around the restart.

Fix → Shed load at the edge, then warm the cache gradually. Add request coalescing (single-flight) so concurrent misses for the same key trigger one DB query, use stale-while-revalidate, and add jitter to TTLs.

Prevent → Treat the cache as a hard dependency in capacity planning, or size the DB for cold-cache load; run a cache-flush chaos experiment.

All SRE & Reliability questions

More on Reliability Patterns in Production