yyyar / gobetween

:cloud: Modern & minimalistic load balancer for the Сloud era
http://gobetween.io
Other
1.94k stars 210 forks source link

howto enable PROXY protocol only for some backends #124

Open shantanugadgil opened 6 years ago

shantanugadgil commented 6 years ago

@thetechnick @yyyar @nickdoikov

I am using Gobetween 0.5.0 configured with SNI enabled. I use Consul for discovery. I have a single listener on 443 and many backends which are reached based on the SNI field.

Using this as reference: https://github.com/yyyar/gobetween/wiki/Proxy-Protocol

My understanding is that the PROXY protocol will get enabled for all backends for a single listener.

Is it possible via Consul discovery to have PROXY enabled only for a few backends and not all ?

This is similar to HAProxy's behavior where it can optionally append the directive send-proxy only to the required backends?

Regards, Shantanu

yyyar commented 6 years ago

Hi @shantanugadgil Yep currently is gets enabled for all backends. Enabling it only for a some backends with directive requires some coding :-) Do you still need this feature?

shantanugadgil commented 6 years ago

Hi, yes, it would be a great enhancement to have it per service. For now I am making do with PROXY disabled for all.