Using Microsoft.Extensions.Http.Resilience #2502
-
|
Can the Microsoft.Extensions.Http.Resilience package be used with YARP or do YARP have it's own HttpClient-factory etc meaning e.g |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
YARP does not use You're able to inject your custom handlers into the There's some more discussion about this in #56. |
Beta Was this translation helpful? Give feedback.
YARP does not use
IHttpClientFactory, but a customIForwarderHttpClientFactory, 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.