Retry Policies
Retry transient failures with backoff.
What Is Polly?
Polly is a .NET resilience library that helps your apps cope with transient failures, slow responses and overloaded dependencies. It provides strategies like retry, circuit breaker, timeout, fallback and rate limiting.
This course uses Polly v8 (the Polly.Core API).
dotnet add package Polly.CoreWhy Retry?
Many failures are transient: a brief network blip, a momentary timeout, a service restarting. Retrying the operation a moment later often succeeds without bothering the user.
Retry should target transient errors only, never permanent ones like a 404.