buraksezer / consistent

Consistent hashing with bounded loads in Golang
https://research.googleblog.com/2017/04/consistent-hashing-with-bounded-loads.html
MIT License
693 stars 69 forks source link

Better Understanding the PartitionCount Configuration #16

Open jon-whit opened 3 years ago

jon-whit commented 3 years ago

@buraksezer First of all, I want to say thanks for this awesome implementation! I've started to use it in one of my projects.

I did, however, have a question about the PartitionCount configuration. I haven't seen a lot of information in the literature about how this impacts the hashing and, more importantly, any strategies on how to best chose the value for any arbitrary type of query workload. What I'm trying to do is uniformly distribute queries for any given resourceID across N cluster members. I like this library because if one of the cluster members fails then the load is redistributed such that any one of the remaining members will receive <= (Load * 100 ) percent of the residual traffic.

But I don't quite yet understand how that goal relates with the PartitionCount, and if I choose a lower value such as 3, 5, or 9 then I experience issues with the library being able to distribute when I add more members. Your input/guidance would be appreciated :)

jon-whit commented 1 year ago

@buraksezer any guidance on this?