An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/stathat/consistent

Package consistent provides a consistent hashing function. Consistent hashing is often used to distribute requests to a changing set of servers. For example, say you have some cache servers cacheA, cacheB, and cacheC. You want to decide which cache server to use to look up information on a user. You could use a typical hash table and hash the user id to one of cacheA, cacheB, or cacheC. But with a typical hash table, if you add or remove a server, almost all keys will get remapped to different results, which basically could bring your service to a grinding halt while the caches get rebuilt. With a consistent hash, adding or removing a server drastically reduces the number of keys that get remapped. Read more about consistent hashing on wikipedia: http://en.wikipedia.org/wiki/Consistent_hashing

Ecosystem
proxy.golang.org
Latest Release
v1.0.0
over 8 years ago
Versions
1
Dependent Packages
198
Dependent Repos
279
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/stathat/consistent
spec
License MIT
Namespace github.com/stathat
First Release over 8 years ago
Last Synced about 9 hours ago
Repository
Stars 977 on GitHub
Forks 185 on GitHub
Docker Dependents 63
Docker Downloads 99,747,830
Rankings on proxy.golang.org
Overall Top 1.0%
Dependent packages Top 0.3%
Dependent repos Top 0.4%
Forks Top 2.1%
Docker downloads Top 0.3%