Automation · Error Handling
Backoff
Cheat sheet · https://pcornel.dk/topic.php?topic=5977
Answer
Backoff increases the wait between retries, such as 1, 2, 4 and 8 seconds, often with random jitter, so retries do not overload a struggling service.
Remember
- Exponential backoff: 1, 2, 4, 8 s.
- Add jitter to spread retries.
- Cap the maximum wait.
First checks
- Exponential backoff with jitter — strategy
- Retry-After honoured — server guidance
- Max delay cap — bounds
Verify in this order
failure → wait (exponential + jitter) → retry
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Error Handling → Backoff · operational reference
| Layer | Error Handling → Backoff operational reference |
|---|---|
| Runtime/ownership | Retry/backoff patterns for distributed automation · identify controller/parser, durable intent, identity and target ownership before mutation |
| Persistent intent | Versioned definition/configuration with explicit dependencies, scope and credential boundary |
| Verification | Run a fixture dependency that returns transient 429/5xx, capture attempt timestamps and Retry-After/backoff, then verify maximum attempts and total deadline. |
| Expected interpretation | Retries occur only for classified transient failures, delay increases/jitters within policy, server retry guidance is respected, total deadline is bounded, and nonretryable errors fail immediately. |
| Recovery boundary | Preserve correlation IDs + pre-state, repair first failing boundary, then verify the target independently |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5977