proxy.golang.org : github.com/hailocab/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
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/hailocab/consistent
License: MIT
Latest release: almost 9 years ago
First release: almost 9 years ago
Namespace: github.com/hailocab
Stars: 0 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 2 months ago