# cache-stampede

Published articles for cache-stampede.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Cache stampede: how one expired key takes down the database

DevFeed: [Cache stampede: how one expired key takes down the database](<https://devfeed.tech/articles/cache-stampede-how-one-expired-key-takes-down-the-database-39600.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/48-cache-stampede-expired-key/>)

Author: hello@ankit-rana.com

Published: 2026-09-05T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Database](<https://devfeed.tech/topics/database.md>), [consistent hashing](<https://devfeed.tech/topics/consistent-hashing.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [cache-stampede](<https://devfeed.tech/tags/cache-stampede.md>), [caching](<https://devfeed.tech/tags/caching.md>), [connection-pool](<https://devfeed.tech/tags/connection-pool.md>), [consistent-hashing](<https://devfeed.tech/tags/consistent-hashing.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [jitter](<https://devfeed.tech/tags/jitter.md>), [query](<https://devfeed.tech/tags/query.md>), [redis](<https://devfeed.tech/tags/redis.md>), [reliability](<https://devfeed.tech/tags/reliability.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>), [traffic](<https://devfeed.tech/tags/traffic.md>), [ttl](<https://devfeed.tech/tags/ttl.md>)

### AI overview

This article explains how a cache stampede occurs when a hot key expires and many requests simultaneously recompute the same value against the database. It recommends TTL jitter to prevent synchronized expirations and request coalescing so only one caller recomputes while others wait or serve stale data. It also discusses cache warming and consistent hashing for broader cache-failure scenarios.

### Source excerpt

A cache TTL is a scheduled simultaneous failure: every request being served from one key misses at the same instant and goes to the origin together. If the recompute takes two seconds, every request arriving during those two seconds also misses, so the pileup grows faster than it drains. Jitter on the TTL stops keys expiring in lockstep, and request coalescing so only one caller recomputes while the rest wait or serve stale is what stops a single expensive key from saturating the database.