yyyar / gobetween

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

Add ipporthash1 balancing strategy #304

Closed danfaizer closed 2 years ago

danfaizer commented 3 years ago

This PR adds ip+port hash balancing strategy. This is useful in certain scenarios were traffic comes from a NATed network and all source IP distribution is bad for balancing and you need stickiness/affinity to the elected backend.

Feel free to dismiss this PR if you don't find it useful enough.

illarion commented 3 years ago

@danfaizer could you please make it part of iphash1 algorithm? So that there will be no 2 separate implementations, but one with optional config parameter (use_port = true for example)