These recipes aren't tied to one stack. They cover what goes wrong between services at peak: retry storms, failing dependencies and cache stampedes. Start with Exponential Backoff and Jitter for Timeouts and Retries.
- Stop a Cache Stampede with Coalescing and Early Refresh
Let one request rebuild an expired key while the rest wait or get the stale copy, so a thundering herd stops hitting your database when a hot key expires.
- Circuit Breaker Pattern for Microservices with Resilience4j
Wrap each dependency in a circuit breaker with Resilience4j or its peers, so a failing service gets cut off fast and your product serves a fallback.
- Exponential Backoff and Jitter for Timeouts and Retries
Give every call a deadline, a per-try timeout and jittered backoff under a retry budget, so a slow dependency can't set off a retry storm.