gobetween icon indicating copy to clipboard operation
gobetween copied to clipboard

Specify which server to use for specific host requests.

Open Spamm00r opened this issue 2 years ago • 2 comments

Hi,

I have go between installed to spread load over 4 different servers. This works fine, but I want outgoing requests to for example myserver.com or a whitelist of hosts to go always over the same server instead of using roundrobin or random allocation of my 4 servers.

Is this somehow possible with the current gobetween settings or can this be implemented?

That would be very helpful.

Spamm00r avatar Mar 16 '23 13:03 Spamm00r

Did you try balance=iphash or iphash1. This should work.

RupeshSangoi avatar Mar 21 '23 13:03 RupeshSangoi

iphash or iphash1 routes all traffic over the same backend instead of spreading it over all the backends, because the traffic is coming from the same client IP.

I can achieve the same thing by dropping gobetween and making direct connections. That's not what I want.

On the contrary, I want 99% of all my outgoing connections through gobetween to be balanced over all my backends, and preferably using the fastest backend available. Right now I achieve this by using roundrobin.

Only for specific requests to certain websites, where it is necessary to always have the same IP, I want gobetween to always use the same Backend instead of a random one. If I use roundrobin on these connections, I will be requesting always with a random IP of one of my Backends. I want to control and ensure what backend these specific connections use and not leave it to roundrobin.

Spamm00r avatar Mar 24 '23 10:03 Spamm00r