What problem does it solve?
Prevents cascading failures and fragile network interactions in .NET 10 applications by providing composable, DI-friendly resilience pipelines that handle retries, circuit breaking, timeouts, fallback, hedging, and rate limiting so call sites remain simple and observable.
Core Features & Use Cases
- Polly v8 ResiliencePipeline composition: build pipelines that chain retry, circuit breaker, timeout, fallback, and hedging strategies without manual nesting.
- HttpClient integration: configure AddStandardResilienceHandler or AddResilienceHandler for IHttpClientFactory to apply per-service resilience defaults and named handlers.
- Non-HTTP and typed pipelines: register AddResiliencePipeline for database, message queue, or typed return scenarios and inject keyed pipelines for testability.
- Telemetry and safe defaults: emits metrics compatible with OpenTelemetry and recommends production-safe defaults (timeouts per attempt, total timeouts, idempotency, and monitoring).
Quick Start
Register an HttpClient in Program.cs and enable AddStandardResilienceHandler or AddResilienceHandler("service-name", ...) to apply retry, circuit breaker, and timeout policies for that external API.