What problem does it solve?
Helps .NET developers design and apply consistent, production-grade resilience strategies to handle transient failures, latency, and cascading errors across HTTP calls and other I/O operations.
Core Features & Use Cases
- HTTP Client Resilience: Configure AddStandardResilienceHandler or named AddResilienceHandler for HttpClient to provide retry, circuit breaker, and per-attempt and total timeouts.
- Non-HTTP Pipelines: Register AddResiliencePipeline for database calls, message queues, and other non-HTTP operations to apply retries and timeouts.
- Advanced Strategies: Support for hedging (parallel requests), typed pipelines with fallbacks, rate limiting integration, and OpenTelemetry telemetry for metrics and state monitoring.
- Guidance & Anti-patterns: Clear recommendations to use Polly v8 pipelines (not v7 policies), avoid per-call manual wrapping, and apply idempotency for non-idempotent retries.
Quick Start
Create a named AddResilienceHandler for the Orders API that applies exponential retry with jitter, a circuit breaker, a 5 second per-attempt timeout, and telemetry via OpenTelemetry.