trydotnet-polly icon indicating copy to clipboard operation
trydotnet-polly copied to clipboard

Try .NET Enabled Samples

dotnet try Enabled

Please read the Try .NET quick setup guide before starting the tutorial below.

Try .NET Samples of Polly, the .NET Resilience Framework

Polly is a resilience framework for .NET, with it your applications will easily tolerate transient faults and longer outages in remote systems or infrastructure. With just a few lines of code your application will be far more robust and reliable.

These demos will walk through all the resilience policies offered by Polly.

If you want to find out more, check the Polly github page, Bryan's blog post on Polly or his Pluralsight course.

About the author: Bryan Hogan is a podcaster, blogger, speaker, loves writing software and helping others write software.

Table of Content

  • Before you add Polly
  • Retrying when you get an exception
  • Retrying when you get a bad result
  • Combining Result and Exception Based Retries
  • Waiting Before Retrying
  • Fallbacks 1
  • Fallbacks 2
  • Timeout
  • Basic Circuit Breaker
  • Advanced Circuit Breaker
  • Caching
  • Bulkhead Isolation
  • Policy Wraps