I'm trying Ocelot package in NET6 Framework but unfortunately, it does not "try" the second Host when the first is unavailable. Example:
"Routes": [
{
"UpstreamPathTemplate": "/api/abc",
"UpstreamHttpMethod": [ "POST" ],
"QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 2,
"DurationOfBreak": 5000,
"TimeoutValue": 2000
},
"DownstreamPathTemplate": "/api/qwe",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "serverA",
"Port": 2019
},
{
"Host": "serverB",
"Port": 2019
}
],
"LoadBalancerOptions": {
"Type": "RoundRobin"
}
So when the ServerA service is offline I do get httpstatus 502 "No connection could be made because the target machine actively refused it" but I was hoping Ocelot would try automatically the ServerB.
Do I need to configure something else on Ocelot to have this behaviour?
Thanks a lot.