Skip to content

How to handle routes with logic to different Clusters? #1159

@donaldgray

Description

@donaldgray

What is the best way to conditionally choose a different Cluster to proxy request to?

For example, ideally I'd like to have an application with 2 Clusters (foo and bar) and a route with "clusterId": "foo" and I want to, depending on some logic applied to an incoming request, use cluster bar. Is this possible?

I'm currently using the Direct Forwarding but that means I lose out on load balancing to Clusters. I can apply any logic I need and change path/destination but without load balancing etc. Is it possible to get access to something that handles this, similar to how IHttpForwarder is used? With this method it looks like I'd need to send the request to another load-balancer for bar and let that do the load balancing.

I had a look at ITransformFactory but that looks like it is transforming requests/responses to/from a specified Cluster, rather than changing the target cluster.

Is this possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementNew feature or requestsamsp_listPersonal tag used when reviewing issues for further discussion

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions