[Paper Review] DxHash: A Scalable Consistent Hash Based on the Pseudo-Random Sequence
DxHash is a scalable, stateless consistent hashing algorithm based on pseudo-random sequences that achieves near-optimal balance, minimal disruption, high lookup throughput (13.3M queries/sec), low memory footprint (0.125n to 5n bytes), and efficient update overhead. It supports dynamic scaling and weighted load distribution via a tunable pseudo-random generator, outperforming state-of-the-art methods in all six key metrics.
Consistent hashing (CH) has been pivotal as a data router and load balancer in diverse fields, including distributed databases, cloud infrastructure, and peer-to-peer networks. However, existing CH algorithms often fall short in simultaneously meeting various critical requirements, such as load balance, minimal disruption, statelessness, high lookup rate, small memory footprint, and low update overhead. To address these limitations, we introduce DxHash, a scalable consistent hashing algorithm based on pseudo-random sequences. To adjust workloads on heterogeneous nodes and enhance flexibility, we propose weighted DxHash. Through comprehensive evaluations, DxHash demonstrates substantial improvements across all six requirements compared to state-of-the-art alternatives. Notably, even when confronted with a 50% failure ratio in a cluster of one million nodes, DxHash maintains remarkable processing capabilities, handling up to 13.3 million queries per second.
Motivation & Objective
- To address the trade-offs in existing consistent hashing algorithms that fail to simultaneously satisfy balance, minimal disruption, statelessness, high lookup throughput, low update overhead, and small memory footprint.
- To design a consistent hashing scheme that maintains high performance under extreme conditions, such as 50% node failure in a 1M-node cluster.
- To enable dynamic cluster scaling and weighted load distribution while preserving consistency and performance.
- To provide a practical, open-source implementation that supports real-world deployment in distributed systems like cloud storage and peer-to-peer networks.
Proposed method
- DxHash uses a deterministic pseudo-random sequence generator to map keys to nodes, ensuring stateless and consistent key-to-node mappings.
- It dynamically selects candidate nodes via iterative hashing, reducing memory usage compared to lookup-table-based methods like Maglev or SACH.
- The algorithm supports both standard and weighted hashing: weighted DxHash assigns nodes different weights to control load distribution proportionally.
- Update operations (node addition/removal) are handled efficiently by recomputing only the affected key mappings using the pseudo-random sequence, minimizing disruption.
- The lookup complexity is O(n/a), where n is the total number of nodes and a is the number of active nodes, enabling high performance even under high failure rates.
- The memory footprint is bounded between n/8 and 5n bytes, significantly smaller than Maglev (4m) and SACH (4m), while maintaining high throughput.
Experimental results
Research questions
- RQ1Can a consistent hashing algorithm achieve near-optimal balance, minimal disruption, statelessness, high lookup throughput, low update overhead, and small memory footprint simultaneously?
- RQ2How does DxHash perform under extreme node failure scenarios, such as 50% failure in a 1M-node cluster?
- RQ3Can DxHash support dynamic cluster scaling and shrinking while maintaining high performance and low remapping overhead?
- RQ4Does weighted DxHash enable accurate, quantitative load distribution proportional to node weights?
- RQ5How does DxHash compare in performance and memory efficiency to state-of-the-art algorithms like Maglev, SACH, and AnchorHash?
Key findings
- DxHash achieves a peak lookup throughput of 13.3 million queries per second even when 50% of one million nodes fail, demonstrating exceptional fault tolerance.
- In a 1M-node cluster with 10% active nodes, DxHash maintains a lookup rate of 4.35 million keys per second, outperforming AnchorHash by a factor of over 100x under low active ratios.
- Weighted DxHash achieves load distribution within 0.1% error margin of theoretical expectations, confirming precise control over workload distribution based on node weights.
- DxHash’s memory footprint is between n/8 and 5n bytes, significantly smaller than Maglev (4m) and SACH (4m), while maintaining O(n/a) lookup complexity.
- The shrinking operation in DxHash improves lookup performance by dynamically adjusting the cluster’s upper bound, increasing active ratio and reducing search length.
- DxHash is stateless for both insertions and removals, eliminating the need for maintaining historical operation order and reducing memory access overhead.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.