spring-cloud-commons icon indicating copy to clipboard operation
spring-cloud-commons copied to clipboard

Supports `consistent-hash` load balancing

Open chenzhiguo opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. A consistent hash based load balancing policy is required.

Describe the solution you'd like I want to be able, based on this implementation, to support the same value eventually being accessed to an same ServiceInstance.

Describe alternatives you've considered I don't have a choice. But I'm trying to make it happen.

Additional context Add any other context or screenshots about the feature request here.

chenzhiguo avatar Jul 28 '21 09:07 chenzhiguo

@chenzhiguo Thanks for submitting this. will discuss it with the team, however, first, let me know if you had any particular value/ field/ key in mind to be used as the base number for hashing? On a somewhat related note, we do have a mechanism that allows you to set the preferred instance via a cookie. Is that helpful for your use-case?

OlgaMaciaszek avatar Sep 08 '21 15:09 OlgaMaciaszek

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues avatar Sep 15 '21 15:09 spring-cloud-issues

I think the data in cookies is just part of the Hash, and we may need to calculate the Hash according to the URL PATH or a parameter.

chenzhiguo avatar Sep 15 '21 16:09 chenzhiguo