HNNewShowAskJobs
Built with Tanstack Start
Rendezvous Hashing Explained (2020)(randorithms.com)
15 points by Bogdanp 3 days ago | 1 comment
  • jongjong12 minutes ago

    I remember reading about Rendezvous Hashing years ago and found it simple, efficient and elegant. I was shocked that everyone was raving about consistent hashing because it is a more complex solution.

    I implemented a Node.js library to go with my WebSocket library:

    https://www.npmjs.com/package/skeleton-rendezvous

    Another interesting point is that both Consistent Hashing and Rendezvous Hashing can be extended in different ways to provide more even distribution between nodes and to reduce the number of keys which need to be recomputed when adding and removing nodes.

    The extended version of consistent hashing involves creating additional virtual buckets/sites around the ring to give each site more coverage.

    The extended version of Rendezvous Hashing involves creating a kind of hierarchy to allow you to add more sites whilst only incurring a O(log n) performance penalty.