Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 267 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 267 Bytes

Weighted Rendezvous Hashing

An alternative to Consistent Hashing. Evenly distributes load on node removal.

ring := rendezvous.New()
for _, s := range serversAndWeights {
  ring.AddWithWeight(s.Addr, s.Weight)
}

addr := ring.Lookup("some_client_addr")