Using Ocelot as API Gateway on standalone Service Fabric cluster using SF Discovery endpoint for downstream services discovery and routing based on the health probes #2287
Unanswered
AlexZ550Proton
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to understand if Ocelot Service Fabric integration relays on SF reverse proxy or it can bypass it and takes its role?
I built an example SF Application which has 2 stateless API services. I want to use Custom Gateway based on Ocelot to handle the incoming traffic and land it on the related service instance based on actual load and health probe indication.
In SF cluster my app looks like this:
I want Clients -> MyGateway endpoint and traffic routed to a corresponded service replica.
For Ocelot I use the config:
What I don't understand if Ocelot uses SF reverse proxy (which is http://localhost:19081 by default) for routing or just for service discovery calls. I see in logs that Ocelot routes calls using http://localhost:19081/MyApp/MyService1/api/etc. But it means it doesn't look up for MyService replicas endpoints and use reverse proxy functionality to route traffic to replicas. SF Reverse proxy doesn't use health probe information and land traffic on unhealthy replicas using simple round-robin. Is there any way to exclude reverse proxy in Ocelot and force to use replicas endpoints rather RP endpoint?
Sample log:
Beta Was this translation helpful? Give feedback.
All reactions