Resilience basics: retry & backoff
Implement simple retries with exponential backoff and jitter; detect transient vs fatal errors; cap delays; stop on cancellation.
Why retry + backoff
Goal: Make calls resilient.
- Retry transient failures
- Use exponential backoff + jitter
- Set a max attempts and max delay
- Stop on fatal errors or cancellation
Classify failures
Transient: timeouts, 429/5xx, temporary network glitches.
Fatal: bad request, unauthorized, validation errors—do not retry.
Rule: retry only what can succeed later.
All lessons in this course
- CancellationToken patterns; cooperative cancel
- Timeouts, IProgress , async disposables (emulation)
- Resilience basics: retry & backoff