Understanding Polly: A Resilience Framework for .NET Applications

Slide Note
Embed
Share

A detailed overview of Polly, a resilience framework for .NET applications designed to help applications recover from failures and outages in external infrastructure. The framework provides building blocks like fluent API, retry strategies, timeouts, and code samples to ensure applications can gracefully handle failures.


Uploaded on Jul 29, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Polly The .NET resilience framework Alan P. Barber 2019.07.25

  2. Senior Consultant at Improving Alan P. Barber Software Developer Computer Scientist Scrum Master Crohn's Disease Fighter Father Blog: alanbarber.com Twitter: @alanbarber GitHub: github.com/alanbarber Husband

  3. A tool to help applications recover from transient failures and extended outages in external infrastructure for which they depends upon. What is a Resilience Framework? If recovery is not possible, the framework should help applications to fail gracefully.

  4. The building blocks

  5. Fluent API Reusable Thread safe Policy Execution delegate Sync and Async Wrap multiple together

  6. Policy Store Dictionary pattern Registry Reusable Dependency Injection

  7. A tale of two strategies

  8. Retry Maybe it's just a blip Wait and Retry Reactive Strategies Let s give it a second to recover Circuit Breaker Give the system a break Fallback Give up and fail gracefully

  9. Timeout I m not going to wait forever Caching Proactive Strategies You already asked me that Bulkhead Isolation Controlled access to a resource

  10. Code samples

  11. Retry

  12. Fallback

  13. Wrapping policies together

  14. Policy Registry

  15. Unit testing

  16. NoOp Provides a policy which executes passed delegates without intervention.

  17. An important note

  18. Support target platforms by version Earliest Polly version with support Latest Polly version with support Target platform .NET Standard 2.1 for use with IHttpClientFactory 6.0.1 Current .NET Standard 2.0 6.0.1 Current .NET Standard 2.0 5.0.3 Current .NET Standard 1.1 5.0.3 Current .NET Standard 1.0 5.0.3 5.1.0 .NET Framework 4.5 1.0.0 5.9.0

  19. Resources http://www.thepollyproject.org https://github.com/App-vNext/Polly

Related


More Related Content