I want to introduce transient fault handling in our .net application. I saw two nu-get packages are available as of now. One is Polly framework and the other one is Microsoft transient fault handling application block.
We investigated and saw both support asynchronous functions and different retry strategies. Polly framework also supports circuit breaker additionally. Could someone suggest which framework to use with some solid reasons. Also, it would be really helpful if pros and cons of both the frameworks along with support on internet community and scope for future extension and support can be highlighted. Thanks in advance.
Polly is a . NET library that provides resilience and transient-fault handling capabilities. You can implement those capabilities by applying Polly policies such as Retry, Circuit Breaker, Bulkhead Isolation, Timeout, and Fallback. Polly targets . NET Framework 4.
Microsoft Entity Framework provides facilities for retrying database operations.
Implement Circuit Breaker pattern with IHttpClientFactory and Polly. As when implementing retries, the recommended approach for circuit breakers is to take advantage of proven . NET libraries like Polly and its native integration with IHttpClientFactory .
Polly is a . NET resilience and transient-fault-handling library that allows developers to express policies such as retry, circuit breaker, timeout, bulkhead isolation, and so forth. It is a mature library that is almost synonymous with app resiliency.
Answering as [disclosure] the lead dev on Polly under the App-vNext umbrella, I'll confine myself to factual answers to your question about support from the internet community and future prospects for the library:
HttpClient
calls, in the HttpClientFactory
planned for .NET Core 2.1.HttpClient
configured with IHttpClientFactory
: ms doco; Polly doco.The Polly team will welcome any community feedback from the SO community!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With