Skip to main content

> Term

Retry Policy

Rules determining how and when failed operations should be attempted again.

Detailed Explanation

A retry policy dictates the rules for when and how a system should attempt an operation that has previously failed, such as an API call or database query.

Instead of immediately giving up or retrying aggressively in a tight loop—which can cause cascading failures—a well-designed retry policy incorporates delays, such as exponential backoff, to give the downstream service time to recover.

Why It Matters

Networks are inherently unreliable. Without a retry policy, a momentary network blip results in a failed user action; with a poor retry policy, a struggling service is quickly hammered to death by immediate, aggressive retries.

Common Failure Mode

A retry storm, where thousands of clients instantly and repeatedly retry a failed request at the exact same time, effectively turning a minor outage into a self-inflicted DDoS attack.

Practical Example

An external payment API returns a 503 Service Unavailable error. Instead of failing the user's checkout immediately, the system waits 1 second, retries, then 2 seconds, then 4 seconds, before finally giving up.

Production Manifestation

Configured in API clients and message queues, using patterns like exponential backoff and jitter (adding randomness to retry intervals to avoid synchronized retry spikes).

Frequently Asked Questions

What is Retry Policy in short?

Rules determining how and when failed operations should be attempted again.

What is the most common failure mode?

A retry storm, where thousands of clients instantly and repeatedly retry a failed request at the exact same time, effectively turning a minor outage into a self-inflicted DDoS attack.

AI Summary

Rules determining how and when failed operations should be attempted again. Networks are inherently unreliable. Without a retry policy, a momentary network blip results in a failed user action; with a poor retry policy, a struggling service is quickly hammered to death by immediate, aggressive retries.