Pcornel
Automation · Error Handling

Backoff

Cheat sheet · https://pcornel.dk/topic.php?topic=5977

Back to the Topic

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

LayerError Handling → Backoff operational reference
Runtime/ownershipRetry/backoff patterns for distributed automation · identify controller/parser, durable intent, identity and target ownership before mutation
Persistent intentVersioned definition/configuration with explicit dependencies, scope and credential boundary
VerificationRun a fixture dependency that returns transient 429/5xx, capture attempt timestamps and Retry-After/backoff, then verify maximum attempts and total deadline.
Expected interpretationRetries 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 boundaryPreserve 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

Confirmation

Confirm action

Continue?