From the course: Complete Guide to Dapr for .NET and Azure Developers: Building and Managing Microservices

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Creating and implementing timeout resiliency policies

Creating and implementing timeout resiliency policies

- [Speaker] Let's say you've already reduced the errors in the Pet Query controller to 30%, but you're now experiencing long delays in responses from the rescue query microservice. Since its data is critical for the pet aggregator, you must wait for the rescue query response. This is a good example of a situation in which a timeout resilience policy can be applied. Such a policy specifies the maximum time-allowed for a service to respond. So let's implement it here in the same resiliency manifest that we have, underneath retries, let's include timeouts, and then I'm going to add a new timeout policy named Wisdom Pet Medicine-service-timeout, and then use, for instance, 10 seconds. And now, we're ready to apply this to the Rescue Query Microservice. So Rescue Query, remember that this is the application ID. And then let's use Timeout and then Wisdom Pet Medicine Service Timeout. And let's also rename this to Wisdom Pet Medicine-service-retry. And so we have to change the name here…

Contents