Consistency hash ring optimization method, system, equipment and medium
The invention provides a consistency hash ring optimization method, system and device and a medium, and relates to the technical field of data services. The method comprises the following steps: defining a hash ring with the length of n; the hash value of the service request is used for carrying out...
Saved in:
Main Author | |
---|---|
Format | Patent |
Language | Chinese English |
Published |
08.09.2023
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The invention provides a consistency hash ring optimization method, system and device and a medium, and relates to the technical field of data services. The method comprises the following steps: defining a hash ring with the length of n; the hash value of the service request is used for carrying out remainder on the hash ring length n, and a corresponding hash ring after request mapping is obtained; dividing the length n of the hash ring by a preset segment number m to obtain the hash segment length of the uniformly distributed hash ring; and dividing the position, mapped to the hash ring, of the service request by the hash segment length of the hash ring to obtain a corresponding segment index. That is to say, the hash ring is optimized, so that the occurrence of the sub-table data skew problem can be prevented based on absolute segmentation optimization without considering virtual nodes.
本发明提出了一种一致性hash环的优化方法、系统、设备及介质,涉及数据业务技术领域。该方法包括以下步骤:定义一个长度为n的hash环;利用业务请求的hash值对hash环长度n取余,得到对应的请求映射后的hash环;利用hash环长度n除以预 |
---|---|
Bibliography: | Application Number: CN202310605268 |