Polly
Polly is a .NET resilience library for defining policies that handle transient faults and control behaviors such as retries, timeouts, circuit breakers, and fallbacks.
ASP.NET Core in Action, 3e
Polly is a .NET resilience library for defining policies that handle faults and control retries, timeouts, circuit breakers, and related behaviors.
- How it is used
- Handles transient failures when .NET applications call remote HTTP APIs through HttpClient.
- How deep it goes
- Explains package setup, handler-pipeline integration, retry timing, supported errors, and policy trade-offs without detailing Polly internals.
- Examples
- Uses an ExchangeRatesClient with three delayed retries and a PolicyHttpMessageHandler flow diagram.
- What you can do after
- Operate/configure Polly through AddTransientHttpErrorPolicy() to retry selected transient HTTP failures automatically.
.NET in Action, Second Edition
Polly is a .NET resilience library for expressing policies such as retries, circuit breakers, timeouts, and fallbacks.
- How it is used
- Applies resilience policies to HTTP requests and other operations that need handling beyond EF Core’s built-in retries.
- How deep it goes
- Builds and registers retry policies, explains back-off and alternatives, then surveys timeouts, fallbacks, circuit breakers, bulkheads, and rate limiting.
- Examples
- Uses an XKCD API client, mocked HTTP handler, transient errors, HTTP 429 responses, and exponential retry delays.
- What you can do after
- Apply it via Microsoft.Extensions.Http.Polly to configure, customize, and test resilience policies for HttpClient operations.
Related concepts
- Microsoft.Extensions.Http.Pollyused by · Microsoft.Extensions.Http.Polly is a .NET integration library that applies Polly resilience policies to HttpClient instances created by IHttpClientFactory.
- retryuses · A retry is a subsequent attempt to perform an operation after an earlier attempt fails or does not complete successfully.
- transient failureaddresses · A transient failure is a temporary failure condition that may resolve on its own or not recur when an operation is attempted again.
- timeoutuses · A timeout is a configured time limit after which an incomplete operation or wait is stopped, abandoned, or treated as unsuccessful.
- rate limituses · A rate limit is a bound on the frequency or volume of operations permitted within a defined interval, scope, or concurrency limit.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

