Cache stampede
A cache stampede occurs when concurrent cache misses trigger the same expensive calculation or data query repeatedly.
A cache stampede occurs when many requests need the same unavailable cache entry at roughly the same time and trigger the same work at the data source. An expired entry or a cache starting empty can therefore cause a load spike.
In a fictional dashboard, 100 concurrent requests within the same authorised data scope look up summary:tenant-7. If the summary is absent and nothing coordinates the work, many identical recalculations may start.
Coalesce requests for the same data
Request coalescing groups these lookups: an ongoing recalculation is shared for the same key and data scope. Other requests wait for the result in a controlled way or receive an older value if the business freshness rule permits it. Coalescing must not combine different user or authorisation scopes.
A lock effective only within one process does not automatically coordinate all servers. Failed calculations and requests waiting too long also need a bounded failure path. Cache invalidation decides when an entry is no longer usable; stampede protection manages concurrent renewal.
Sources
Related terms
- CachingCaching reuses stored data or results. Validity and the permitted user scope belong in the design.
- Cache invalidationCache invalidation ends reuse of a stored copy under defined rules. The source record remains a separate concern.
- BackpressureBackpressure adjusts incoming data to the receiver’s processing capacity through signals to slow down or pause.
- Race conditionA result depends on the timing of overlapping accesses and can therefore be wrong.
- Memory leakMemory that is no longer needed stays allocated while the program runs.
- ConcurrencyOrganising multiple tasks so that their processing periods can overlap.
Your project with ASES
Describe your project to us. We will get back to you with an initial assessment.