Skip to content

Routing with dynamic cluster? #2632

Answered by MihaZupan
alrz asked this question in Q&A
Discussion options

You must be logged in to vote

I'd say the preferred approach depends on how many such clusters you have / whether they're dynamic (you add/remove them while the proxy is running).

If you only have a handful of static ones, you could simply define them all in the configuration file.

If there are a lot of different ones / they're updated often, it may be easiest to switch to a code-based approach. Since you mentioned only having one destination per cluster, you're unlikely to benefit from features such as session affinity, load balancing, or health checks, so you could look at using direct forwarding.
E.g. something along the lines of

var destinations = new Dictionary<string, string>
{
    { "foo", "https://foo.com" }
};

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MihaZupan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants