Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mosuka/rendezvous
Weighted Rendezvous Hashing
https://github.com/mosuka/rendezvous
consistent-hashing go golang rendezvous-hashing weighted
Last synced: 3 months ago
JSON representation
Weighted Rendezvous Hashing
- Host: GitHub
- URL: https://github.com/mosuka/rendezvous
- Owner: mosuka
- License: bsd-3-clause-clear
- Created: 2021-12-01T06:49:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T02:54:08.000Z (10 months ago)
- Last Synced: 2024-06-21T18:00:19.922Z (7 months ago)
- Topics: consistent-hashing, go, golang, rendezvous-hashing, weighted
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Weighted Rendezvous Hashing
An alternative to Consistent Hashing. Evenly distributes load on node removal.
```go
ring := rendezvous.New()
for _, s := range serversAndWeights {
ring.AddWithWeight(s.Addr, s.Weight)
}addr := ring.Lookup("some_client_addr")
```