consistent
consistent copied to clipboard
Consistent hashing with bounded loads in Golang
If there are no members in the hashring, calling the `AverageLoad()` function results in a "divide-by-zero" panic. Example, this will result in a `panic`: ``` package main import ( "fmt"...
Replica names are created by smashing the member name and the replica number together. https://github.com/buraksezer/consistent/blob/a1a9c4ab8d2da437ecbf64219cc0b6cf58639b7e/consistent.go#L250 Member names that end in numbers may collide with replicas of other members. For example,...
@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...
I read your implementation, but I don't quite understand the variable of PartitionCount. Why not directly use sortedSet to locate the member where the data is located
This demo will panic: ```go package main import ( "github.com/buraksezer/consistent" "github.com/cespare/xxhash" ) type hasher struct{} type myMember string func (m myMember) String() string { return string(m) } func (h hasher)...
Hello! 👏 This PR fixes #19. Also I've made several changes in the `getClosestN` method in order to reduce allocations.
Hi @buraksezer Thanks for the implementation. I needed some guidance for my use case, will be glad if you can provide recommendation on how should I configure the hash ring....
Currently all members added are replicated a constant ReplicationFactor of times over the keyspace. If members are heterogeneous, it would be useful to be able to have them replicated at...