Top 0.4% dependent packages on proxy.golang.org
Top 0.5% dependent repos on proxy.golang.org
Top 3.1% forks on proxy.golang.org
Top 0.6% docker downloads on proxy.golang.org
proxy.golang.org : github.com/buraksezer/consistent
Package consistent provides a consistent hashing function with bounded loads. This implementation also adds partitioning logic on top of the original algorithm. For more information about the underlying algorithm, please take a look at https://research.googleblog.com/2017/04/consistent-hashing-with-bounded-loads.html Example Use: Now you can create a new Consistent instance. This function can take a list of the members. In the following sample, you add a new Member to the consistent hash ring. myMember is just a Go struct that implements the Member interface. You should know that modifying the consistent hash ring distributes partitions among members using the algorithm defined on Google Research Blog. Remove a member from the consistent hash ring: LocateKey hashes the key and calculates partition ID with this modulo operation: MOD(hash result, partition count) The owner of the partition is already calculated by New/Add/Remove. LocateKey just returns the member that is responsible for the key.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/buraksezer/consistent
Keywords:
awesome
, awesome-go
, consistent-hashing
, consistent-hashing-library
, consistenthash
, golang
, load-balancing
License: MIT
Latest release: over 2 years ago
First release: about 4 years ago
Namespace: github.com/buraksezer
Dependent packages: 143
Dependent repositories: 157
Stars: 577 on GitHub
Forks: 65 on GitHub
Docker dependents: 15
Docker downloads: 564,240
See more repository details: repos.ecosyste.ms
Last synced: about 10 hours ago