Build Resilient Applications with Polly


Do you build resilient applications? If so, do you use Polly? If not, are you certain they’re actually resilient? (and yes, I admit I’m being a bit provocative just to get your attention.)

I work as a software engineering consultant for the Application Services division of World Wide Technology. We had an internal conference scheduled for the summer of 2020, but like everything else it was cancelled due to the Covid-19 pandemic. However, in accordance with the agile principles we hold so dear, we decided to embrace change. We pivoted into a virtual conference series instead. I was grateful and excited when they tapped me to be one of the presenters!

I gave my presentation on how to build resilient applications with Polly, a .NET resilience and transient-fault-handling framework. In the presentation, I identify several of the pitfalls that even the most meticulously crafted applications can succumb to when running in the real world. I then demonstrate several techniques for mitigating those types of issues using Polly.

Here are some of the policy types that Polly offers to help you build resilient applications:

  1. Retry
  2. Wait and retry
  3. Retry with exponential back-off
  4. Fallback
  5. Timeout
  6. Proactive/reactive cache
  7. Circuit breaker
  8. Bulkhead isolation

Also, check out this related post on how to Create a Two-Way Communication Demo.

related source code can be found here.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.