Make Your HttpClient Resilient - Circuit Breaker, Retry, Timeout
Want to master Clean Architecture? Go here: https://bit.ly/3PupkOJ
Want to unlock Modular Monoliths? Go here: https://bit.ly/3SXlzSt
Join a community of 1000+ .NET developers: https://www.patreon.com/milanjovanovic
Discover how to build robust and fault-tolerant .NET applications by implementing resilience patterns with HttpClient. This tutorial covers essential techniques, including the Circuit Breaker pattern to prevent cascading failures, retry mechanisms for handling transient errors, and timeout strategies to manage unresponsive services. Learn how to combine these patterns to create a resilient HttpClient that can gracefully handle network issues and service outages.
Building Resilient Cloud Applications With .NET
https://www.milanjovanovic.tech/blog/building-resilient-cloud-applications-with-dotnet
Check out my courses:
https://www.milanjovanovic.tech/courses
Read my Blog here:
https://www.milanjovanovic.tech/blog
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Chapters
0:00 API setup and walkthrough
3:32 Simulating API failures
5:35 Timeout strategy
8:37 Retry strategy
12:02 Global Timeout strategy
14:19 Circuit Breaker strategy
16:49 Standard Resilience handler
18:13 Standard Hedging handler
18:39 .NET Aspire resilience