4 ms·
I like consistent hashing (https://en.m.wikipedia.org/wiki/Consistent_hashing https://en.m.wikipedia.org/wiki/Consistent_hashing). When a hash table (or load ba
by swizzler 4y ago
I like consistent hashing (https://en.m.wikipedia.org/wiki/Consistent_hashing https://en.m.wikipedia.org/wiki/Consistent_hashing). When a hash table (or load balancing pool) needs to be resized, it usually reduces the number of keys (clients) that need to be remapped.
- pianoben 4y agoEven simpler is Weighted Rendezvous Hashing (https://www.snia.org/sites/default/files/SDC15_presentations/dist_sys/Jason_Resch_New_Consistent_Hashings_Rev.pdf https://www.snia.org/sites/default/files/SDC15_presentations...). It's quite a bit easier to implement and verify than consistent hashing, and carries the same benefits (minimal reshuffling on ring resizes, etc)
- eru 4y agoI recently updated the Python example on the Wikipedia page for Weighted Rendezvous Hashing. (I'm amazed my edit seems to be still there.) https://en.wikipedia.org/wiki/Rendezvous_hashing https://en.wikipedia.org/wiki/Rendezvous_hashing
- feurio 4y agoIn a similar vein, Maglev hashing has a more uniform distribution and decent reshuffling. I couldn't get my head around the explainaions that I had seen until I read this one: https://www.usenix.org/sites/default/files/conference/protected-files/nsdi16_slides_eisenbud.pdf https://www.usenix.org/sites/default/files/conference/protec...