FlipHash: A Constant-Time Consistent Range-Hashing Algorithm (2402.17549v1)
Abstract: Consistent range-hashing is a technique used in distributed systems, either directly or as a subroutine for consistent hashing, commonly to realize an even and stable data distribution over a variable number of resources. We introduce FlipHash, a consistent range-hashing algorithm with constant time complexity and low memory requirements. Like Jump Consistent Hash, FlipHash is intended for applications where resources can be indexed sequentially. Under this condition, it ensures that keys are hashed evenly across resources and that changing the number of resources only causes keys to be remapped from a removed resource or to an added one, but never shuffled across persisted ones. FlipHash differentiates itself with its low computational cost, achieving constant-time complexity. We show that FlipHash beats Jump Consistent Hash's cost, which is logarithmic in the number of resources, both theoretically and in experiments over practical settings.
- Ben Appleton and Michael O’Reilly. 2015. Multi-probe consistent hashing. CoRR abs/1505.00062 (2015). arXiv:1505.00062 http://arxiv.org/abs/1505.00062
- Yann Collet. 2019. Presenting XXH3. https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html.
- MementoHash: A Stateful, Minimal Memory, Best Performing Consistent Hash Algorithm. arXiv:2306.09783 [cs.DC]
- Consistently Faster: A Survey and Fair Comparison of Consistent Hashing Algorithms. In Proceedings of the 31st Symposium of Advanced Database Systems, Galzingano Terme, Italy, July 2nd to 5th, 2023 (CEUR Workshop Proceedings, Vol. 3478), Diego Calvanese, Claudia Diamantini, Guglielmo Faggioli, Nicola Ferro, Stefano Marchesin, Gianmaria Silvello, and Letizia Tanca (Eds.). CEUR-WS.org, 51–64. https://ceur-ws.org/Vol-3478/paper03.pdf
- Dynamo: Amazon’s highly available key-value store. In ACM Symposium on Operating System Principles. https://www.amazon.science/publications/dynamo-amazons-highly-available-key-value-store
- Chaos Dong and Fang Wang. 2021. DxHash: A Scalable Consistent Hash Based on the Pseudo-Random Sequence. CoRR abs/2107.07930 (2021). arXiv:2107.07930 https://arxiv.org/abs/2107.07930
- Maglev: A Fast and Reliable Software Network Load Balancer. In 13th USENIX Symposium on Networked Systems Design and Implementation, NSDI 2016, Santa Clara, CA, USA, March 16-18, 2016, Katerina J. Argyraki and Rebecca Isaacs (Eds.). USENIX Association, 523–535. https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/eisenbud
- Pelle Evensen. 2019. Stronger, better, morer, Moremur; a better Murmur3-type mixer. https://mostlymangling.blogspot.com/2019/12/stronger-better-morer-moremur-better.html.
- Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web. In Proceedings of the Twenty-Ninth Annual ACM Symposium on the Theory of Computing, El Paso, Texas, USA, May 4-6, 1997, Frank Thomson Leighton and Peter W. Shor (Eds.). ACM, 654–663. https://doi.org/10.1145/258533.258660
- Web Caching with Consistent Hashing. Comput. Networks 31, 11-16 (1999), 1203–1213. https://doi.org/10.1016/S1389-1286(99)00055-9
- Avinash Lakshman and Prashant Malik. 2010. Cassandra: a decentralized structured storage system. ACM SIGOPS Oper. Syst. Rev. 44, 2 (2010), 35–40. https://doi.org/10.1145/1773912.1773922
- John Lamping and Eric Veach. 2014. A Fast, Minimal Memory, Consistent Hash Algorithm. CoRR abs/1406.2294 (2014). arXiv:1406.2294 http://arxiv.org/abs/1406.2294
- Jon Maiga. 2020. The construct of a bit mixer. https://jonkagstrom.com/bit-mixer-construction/.
- AnchorHash: A Scalable Consistent Hash. IEEE/ACM Trans. Netw. 29, 2 (2021), 517–528. https://doi.org/10.1109/TNET.2020.3039547
- Consistent Hashing with Bounded Loads. In Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018, Artur Czumaj (Ed.). SIAM, 587–604. https://doi.org/10.1137/1.9781611975031.39
- Yuichi Nakatani. 2021. Structured Allocation-Based Consistent Hashing With Improved Balancing for Cloud Infrastructure. IEEE Trans. Parallel Distributed Syst. 32, 9 (2021), 2248–2261. https://doi.org/10.1109/TPDS.2021.3058963
- Stateless Datacenter Load-balancing with Beamer. In 15th USENIX Symposium on Networked Systems Design and Implementation, NSDI 2018, Renton, WA, USA, April 9-11, 2018, Sujata Banerjee and Srinivasan Seshan (Eds.). USENIX Association, 125–139. https://www.usenix.org/conference/nsdi18/presentation/olteanu
- Matthew Sackman. 2015. Perfect Consistent Hashing. CoRR abs/1503.04988 (2015). arXiv:1503.04988 http://arxiv.org/abs/1503.04988
- David Thaler and Chinya V. Ravishankar. 1996. A Name-Based Mapping Scheme for Rendezvous. Technical Report CSE-TR-316-96, University of Mishigan (1996). https://www.eecs.umich.edu/techreports/cse/96/CSE-TR-316-96.pdf
- David Thaler and Chinya V. Ravishankar. 1998. Using name-based mappings to increase hit rates. IEEE/ACM Trans. Netw. 6, 1 (1998), 1–14. https://doi.org/10.1109/90.663936