Skip to content

技术沙龙003: 最近有小伙伴跑过来问什么是Hash一致性算法,说面试的时候被问到了,因为不了解,所以就没有回答上 #56

Description

@watchpoints

一句话解释

解释不出来 图文表示

Redis集群 解决数据存储问题

image
设4台缓存中突然有一台缓存服务器出现了故障,无法进行缓存,那么我们则需要将故障机器移除,但是如果移除了一台缓存服务器,那么缓存服务器数量从4台变为3台

image
image
综上所述,一致性Hash算法对于节点的增减都只需重定位环空间中的一小部分数据,具有较好的容错性和可扩展性。

美国麻省理工学院在1997年发表的论文《Consistent Hashing and Random Trees: Distributed Caching Protocols for Releifying Hot Spots on the World Wide Web(一致性哈希和随机树:缓解万维网上的热点的分布式缓存协议)》中首次提出了一致性hash(Consistent hashing)的思想。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions