Contents
At a glance
- Category
- Automation mechanics
- Exponential backoff
- Each wait roughly doubles - 1s, 2s, 4s, 8s
- Jitter
- Randomness added so clients do not retry in synchronised waves
- Retry these
- Timeouts, connection resets, 429, and 5xx
- Never retry
- 4xx other than 429 - the request itself is wrong
- Must define
- What happens when retries are exhausted - queue, alert or safe default
What retry and backoff means
Networks drop packets, services restart, rate limits bite. Many failures are transient, and the correct response is to try again. Backoff is the discipline that makes retrying safe: wait before retrying, and make each wait longer than the last - typically doubling, which is why it is called exponential backoff.
Jitter is the piece people leave out. Add randomness to each wait so that a thousand clients failing at the same moment do not all retry at the same moment. Without it you get a thundering herd: the service recovers, is immediately flattened by synchronised retries, and fails again. AWS's own guidance on timeouts, retries and backoff with jitter is the standard reference.
What to retry, and what never to
Retry transient failures: network timeouts, connection resets, HTTP 429, and 5xx server errors. Do not retry 4xx errors other than 429 - a 400 means your request is malformed, a 401 means your credentials are wrong, a 404 means the thing is not there. None of those improve on the tenth attempt, and retrying them burns your rate limit and, on per-action platforms, your billing unit.
Retry only what is safe to repeat. A retried POST can create a duplicate record and a retried send can text a customer twice, so retries and idempotency are a single design decision rather than two. If an operation cannot be made idempotent, it needs a different failure route rather than a retry.
Setting the policy
Four parameters. Attempts: three to five is typical - beyond that you are usually delaying an inevitable failure rather than recovering. Base delay: a second or two is a reasonable start for API calls. Growth: doubling each time. Cap: a maximum wait, so the fifth retry is not half an hour away.
Always honour a Retry-After header when the service sends one - it is the server telling you exactly when to come back, and it beats any policy you invented. And set a total time budget as well as an attempt count, so a workflow cannot sit in a retry cycle for an hour while the customer waits, which matters whenever there is a latency budget to meet.
What happens when retries are exhausted
This is the part that gets skipped, and it is the part that matters. Decide explicitly: does the item go to a dead-letter queue for later reprocessing, does a human get notified, does the workflow fall back to a safe default? Silent failure after exhausted retries is worse than immediate failure, because nobody knows the work did not happen.
Log every retry, not just the final failure. A workflow that succeeds on the third attempt every time looks perfectly healthy on a success-rate dashboard while quietly telling you the downstream service is failing two thirds of the time - which is exactly the kind of signal observability exists to surface.
What you should know
Check what your platform already does. n8n, Make and Zapier all retry certain failures automatically, with their own policies and limits, and stacking your own retry logic on top of theirs multiplies the attempts in ways nobody intended. Find out the built-in behaviour first, then add only what is missing.
Retry and backoff FAQ
What is exponential backoff?
Waiting longer before each successive retry, typically doubling the delay each time. It gives a struggling service room to recover instead of being hit repeatedly, and it stops a brief outage turning into a sustained one driven by your own retry traffic.
Why do I need jitter?
Because without randomness, every client that failed at the same moment retries at the same moment. The service recovers, is immediately flattened by the synchronised wave, and fails again. Adding random variation to each wait spreads the load out.
Which errors should I retry?
Transient ones: network timeouts, connection resets, HTTP 429 rate limits, and 5xx server errors. Never retry other 4xx codes - a malformed request, bad credentials or a missing resource will fail identically every time while consuming your rate limit and billing units.
How many times should I retry?
Three to five attempts covers genuinely transient failures. Beyond that you are usually delaying an inevitable failure. Set a total time budget alongside the attempt count, especially where a customer is waiting on the result.
Is it safe to retry any request?
No. A retried create or send can duplicate a record or message a customer twice. Retries are only safe when the operation is idempotent, so design the two together - and if something cannot be made idempotent, give it a failure route rather than a retry.
What should happen when retries run out?
Something explicit: the item goes to a dead-letter queue for reprocessing, a person is notified, or the workflow takes a safe default. Silent failure after exhausted retries is the worst outcome, because the work did not happen and nobody knows.
Primary source
AWS Builders' Library - timeouts, retries and backoff with jitter
Checked August 2026. Anything priced or rate-limited moves, so verify against the source before you budget.
Want this built rather than explained?
Knowing what retry and backoff means is one thing; having it running in your business is another. We scope one workflow at a time, quote a fixed price in writing after a free consult, build it, and hand it over with documentation you own.
