Skip to content

Prevention strategies

Locks, single-flight, jitter, and cache warming.

Strategy

Mechanism

Best for

Lock

First request takes mutex, others wait

Critical hot keys

Single-flight

Only one refresh; others get stale

Library-level

Jitter TTL

Randomize expiry ±10%

Even distribution

Cache warming

Pre-fill before expiry

Known hot keys

Stale-while-revalidate

Serve stale while refreshing

HTTP responses