推荐orasis · 2021-10
“The original paper is much more informative than the article:”
推荐读 jump hash 的原始论文,比那篇文章信息量大得多
五行代码实现的跳跃一致性哈希算法
论文提出跳跃一致性哈希(jump consistent hash),约 5 行代码即可表达,速度快、内存占用极小。与 Karger 等人的算法相比,它不需要存储,速度更快,在桶数变化时对键空间和负载的均匀分配也更好;主要限制是桶必须按顺序编号,因此更适合数据存储而不是分布式网页缓存。
评论者把它作为一致性哈希的实用选择来引用:只需一份有序的主机列表即可,代码短到能直接贴进评论里,并称原论文比相关文章更详细。
“The original paper is much more informative than the article:”
“You can also use something like jump consistent hash [0] which only requires you to have a consistent ordering of the hosts where you're sending the information.”
“and co-inventing jump consistent hash: A Fast, Minimal Memory, Consistent Hash Algorithm”
“The cool thing about google's one is it's so short I can include it in a HN comment:”