Skip to content

How to define multiple DownstreamPathTemplates to work for one UpstreamPathTemplate? #1574

Closed

Description

@fdevGit

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 !

Activity

  1. fdevGit commented on May 6, 2022

    @fdevGit
    Author
  2. bwn-z commented on May 6, 2022

    @bwn-z

    I thought it should be at the load balancer level

    ocelot --> loadbalancer --> instance1
                           |--> instance2
                           |--> instance3
    
  3. fdevGit commented on May 9, 2022

    @fdevGit
    Author

    @bwn-z load balancer only provides routing to one endpoint. I want to forward one incoming request to two different endpoints

  4. TanmayS0406 commented on Oct 11, 2023

    @TanmayS0406
    Contributor

    @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.

  5. ggnaegi commented on Oct 11, 2023

    @ggnaegi
    Collaborator

    @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.

  6. TanmayS0406 commented on Oct 11, 2023

    @TanmayS0406
    Contributor

    @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?

  7. self-assigned this
    on Oct 12, 2023
  8. added
    question
    on Oct 12, 2023
  9. changed the title [-]How to define multiple DownstreamPathTemplates to work for one UpstreamPathTemplate[/-] [+]How to define multiple DownstreamPathTemplates to work for one UpstreamPathTemplate?[/+] on Oct 12, 2023
  10. locked and limited conversation to collaborators on Oct 12, 2023
  11. converted this issue into a discussion #1727 on Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions