知识卡片
一致性哈希限制迁移
把键的哈希值和节点映射到同一个环上,每个节点负责从前驱到自身的区间。插入节点只拆分邻近责任范围,删除节点也只转交其范围。与按节点数取模相比,节点数量发生变化时,远离变更位置的区间不需要重算归属。
参见 [[分片决定请求的去向]]。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 分片路由与扩缩容
原书出处 · 1 处
- Chapter 13. Distributed Transactions 分片路由与扩缩容 · 查看原书依据
In order to mitigate this problem, some databases, such as Apache Cassandra and Riak (among others), use a different partitioning scheme called consistent hashing. As previously mentioned, routing key values are hashed. Values returned by the hash function are mapped to a ring, so that after the largest
参考来源
- 位置:《Database Internals》Chapter 13. Distributed Transactions(book-source:extracted/Database Internals A deep-dive into how distributed data systems work (Alex Petrov)/_epub-src/OEBPS/ch13.html#idm46104529495464,段 103)
- 结论依据:原文定义哈希环和前驱范围,并以扩缩容时只影响直接邻居说明移动量下降。
- 原始内容:In order to mitigate this problem, some databases, such as Apache Cassandra and Riak (among others), use a different partitioning scheme called consistent hashing. As previously mentioned, routing key values are hashed. Values returned by the hash function are mapped to a ring, so that after the largest