A retry policy automatically repeats an operation after qualifying failures. Use retries for transient faults, such as temporary database unavailability, network failures, timeouts, or selected HTTP 500-level responses—not for every failure indiscriminately. section 11.0 section 11.3
EF Core execution strategies provide database-specific automatic retries, but transactions require special handling. A lost connection during commit can leave the outcome uncertain, so verify the transaction when possible or deliberately retry the complete transaction. section 11.2.2 section 11.4
Production retry implementations should:
- Retry only failures classified as transient or otherwise safe to repeat. section 11.2.2
- Use delay and back-off rather than issuing immediate repeated requests. section 11.3.2
- Test policies by simulating failures, including invalid HTTP responses. section 11.3 section 11.4
Retrying an HTTP request with Polly
Register a Polly policy on an HttpClient, handle transient HTTP errors, and wait between six attempts using an exponentially increasing delay. Customize the policy when a specific response, such as 429 Too Many Requests, also requires a retry.




















