Skip to content

Using Microsoft.Extensions.Http.Resilience #2502

Discussion options

You must be logged in to vote

YARP does not use IHttpClientFactory, but a custom IForwarderHttpClientFactory, so you can't use the factory extensions.

You're able to inject your custom handlers into the HttpClient, but retires at that layer may not be the most effective with YARP.
That is, instead of retrying a request to the same destination, you likely want to try a different one and let YARP know that the first one is unhealthy.

There's some more discussion about this in #56.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MihaZupan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants