Courses / AWS
51. Retry with exponential backoff and jitter
Best-practice retries with exponential backoff and jitter to avoid thundering herds.
Infrastructure as Code / AWS (Terraform & CLI)
Retry with exponential backoff and jitter
A retry strategy that waits progressively longer between attempts and adds randomness to prevent many clients from retrying simultaneously.
"I keep getting throttled when many scripts hit the API at once — how do I avoid a thundering herd?"
Exponential backoff increases the wait time after each failed attempt (e.g., 1s, 2s, 4s), and adding jitter randomizes those waits so many clients don't collide when recovering.
"I keep getting throttled when many scripts hit the API at once — how do I avoid a thundering herd?"
Exponential backoff increases the wait time after each failed attempt (e.g., 1s, 2s, 4s), and adding jitter randomizes those waits so many clients don't collide when recovering.