.pdf 这篇文章理论性太强,看看其中的摘要知道他能解决什么问题就行了
这篇利用consistent hash做了个类似DNS的试验,从这其中的数据来看,
caches | Avg entries in cache | Std Dev | Std Dev as % of mean |
3 | 8934 | 246 | 2.7 |
5 | 5360 | 173 | 3.2 |
8 | 3350 | 112 | 3.4 |
10 | 2680 | 68 | 2.6 |
10台机器,1000000数据的结果
0.1608332
0.0769515
0.0302407
0.1391537
0.0465187
0.1591667
0.0904439
0.1026281
0.044984
0.1490795
分布好像不是那么均匀
用的是python 的hashlib md5算法截取int前32位
各位有没有在生产中真正使用过consistent hash,其中的hash函数采用的什么形式?
未完待续