I have a question about api gateway with Ocelot on NET Core 3.1 and I have a microservice posted on two different sites, and I want you to check with a balancer to see if the microservice is down, and if so go to the second microservice. I have tried this: https://ocelot.readthedocs.io/en/latest/features/loadbalancer.html#configuration and it works but the problem is that it only analyzes the number of requests and it orchestrates as it arrives, but if the service is down it makes and gives error. is it possible to raise what I need with ocelot? do I need some extra nuget package? thank you very much
Asked
Active
Viewed 831 times
0
-
If it is a question of availability, you could prevent this problem by using service discovery. This way, only available services will be considered for routing:https://ocelot.readthedocs.io/en/latest/features/loadbalancer.html#service-discovery – DeveloperExceptionError Mar 02 '20 at 22:46
-
Otherwise you might want to build the mechanism yourself, using a library like `Polly` for timeouts and circuit breakers. – DeveloperExceptionError Mar 02 '20 at 22:47