Automation · Automation Design
Retry Logic
Cheat sheet · https://pcornel.dk/topic.php?topic=5204
Answer
Retry logic reruns a failed step a limited number of times, with delays or backoff, for transient errors like timeouts. Only retry operations that are safe to repeat.
Remember
- Retry only transient failures like timeouts or HTTP 503.
- Limit the number of attempts.
- Add backoff so retries do not overload the target.
First checks
- Retry with exponential backoff and jitter — policy
- Max attempts — limit
- Only retry transient errors — classification
Verify in this order
transient error → backoff → retry → give up after N
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.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5204