AddStandardResilienceHandler
A one-line setup that adds a recommended resilience pipeline, including rate limiting, total timeout, retry, circuit breaker and attempt timeout, to an HttpClient.
In more detail
The defaults are a reasonable starting point for outbound HTTP calls. Tune its options, such as Retry.MaxRetryAttempts and TotalRequestTimeout, from measured downstream behaviour.
Related terms
- Polly — A .NET resilience library for retries, circuit breakers, timeouts and related strategies around unreliable calls.
- IHttpClientFactory — The ASP.NET Core factory that creates configured HttpClient instances, reusing connections and attaching handlers such as resilience.
- retry — Sending a request again after it failed or timed out, in the hope that it succeeds the second time.
- circuit breaker — A wrapper around calls to another service that stops making calls for a while after repeated failures, so the failing service can recover.
Taught in
- Retry and Circuit Breaker Policies with Polly — Modern .NET Core, C# & Enterprise Microservices