DBLE Sharding Algorithms Overview and Introduction of the JumpStringHash Algorithm
This article reviews the seven sharding algorithms supported by DBLE, introduces the unique JumpStringHash algorithm with its configuration and usage details, summarizes the complete XML rule examples for all algorithms, and links to the previous series articles for further reference.
We have previously introduced six common sharding algorithms of DBLE and MyCat; this article summarizes them and adds the seventh algorithm, JumpStringHash, which is unique to DBLE.
The JumpStringHash algorithm originates from Google’s paper “A Fast, Minimal Memory, Consistent Hash Algorithm” and distributes hash values uniformly across n nodes using a probabilistic approach.
Configuration example (rule.xml) for JumpStringHash:
#rule.xml
2
0:2Key parameters: partitionCount – number of shards; hashSlice – length of the hash slice used for partitioning.
Note: When the sharding column value is NULL, data always lands on node 0; if the corresponding MySQL column is NOT NULL, a NULL value will trigger the error "Sharding column can't be null when the table in MySQL column is not null".
The article also provides a comprehensive set of XML configurations for all seven sharding algorithms, including enum, rangeLong, hashLong, hashLong2, hashLong3, hashString, date, pattern, and others, with sample <tableRule> definitions illustrating how each algorithm is applied.
Finally, it links back to the previous six articles in the DBLE sharding series and encourages readers to stay updated with community news and upcoming technical content submissions.
Aikesheng Open Source Community
The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.