Skip to content

mosuka/rendezvous

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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")