Ocelot
Ocelot copied to clipboard
How to define multiple DownstreamPathTemplates to work for one UpstreamPathTemplate
Hello, quick question. How to set up an incoming request to redirect to more than one endpoint
I'm thinking something like this, I will meet at separate endpoints for both the function and the counter of a request.
Regards !
@TomPallister
I thought it should be at the load balancer level
ocelot --> loadbalancer --> instance1
|--> instance2
|--> instance3
@bwn-z load balancer only provides routing to one endpoint. I want to forward one incoming request to two different endpoints
@fdevGit Just want to hit two enpoints means? you can use HttpClient from polly libraray and in same controller you can call two endpoints. Ocelot is api gateway, these things are not part of gateway instead you need your backend logic for it.
@ggnaegi @raman-m I don't think any action needed here, we can close if answer is right.
@fdevGit You could implement your own delegating handler https://ocelot.readthedocs.io/en/latest/features/delegatinghandlers.html and call the counter endpoint from there with HttpClient.
@ggnaegi I have question here: if anyone add some time consuming logic in SendAsync method, will it slow down application startup time or any time for request to reach controller level of same api?