From the course: Azure Microservices with .NET Core for Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add resiliency to the products microservice with Polly

Add resiliency to the products microservice with Polly - Azure Tutorial

From the course: Azure Microservices with .NET Core for Developers

Start my 1-month free trial

Add resiliency to the products microservice with Polly

- One of the drawbacks that synchronous communication has is that availability could be reduced. This is because it involves more than one microservice. Let's find out how we can improve this by adding resiliency traits in our services with Polly. Polly is a .NET resilience and transient-fault-handling library that we can use to add policies such as automatic retry and circuit breaker. First, let's see what would happen if the product's microservice is down. So let's right-click here in the solution file and we're going to set the action as none to prevent the product's microservice to run. Let's try this, and let's open Postman. Let's click on the Send button here in Postman, and as you can see, the request is taking so long and I even get this error message. This is because the product microservice is not running. So let's go back to Visual Studio, and let's stop this debugging. And the first thing that I want to do is to…

Contents