Polly is a resilience and transient-fault-handling library for .NET applications. It provides a framework for defining and executing stability patterns that manage failures and resource exhaustion during operation execution.
The library enables developers to compose complex resilience strategies through a fluent builder pattern, wrapping target operations in functional decorators. These policies intercept execution flow to apply automated recovery mechanisms, such as retries for temporary errors or circuit breakers that isolate unstable components by blocking requests.
The framework supports both synchronous and asynchronous execution paths, integrating with native cancellation tokens to enforce time-bounded limits on operations. By managing these execution lifecycles, the library helps maintain system responsiveness and prevents cascading failures in distributed service architectures.