• 请不要在回答技术问题时复制粘贴 AI 生成的内容
cyhone
V2EX  ›  程序员

一致性 Hash 原理及 GroupCache 源码分析

  •  
  •   cyhone · Feb 21, 2021 · 2318 views
    This topic created in 1909 days ago, the information mentioned may be changed or developed.

    一致性 Hash 常用于缓解分布式缓存系统扩缩容节点时造成的缓存大量失效的问题。一致性 Hash 与其说是一种 Hash 算法,其实更像是一种负载均衡策略。

    GroupCache 是 golang 官方提供的一个分布式缓存库,其中包含了一个简单的一致性 Hash 的实现。其代码在 github.com/golang/groupcache/consistenthash。本文将会基于 GroupCache 的一致性 Hash 实现,深入剖析一致性 Hash 的原理。

    本文会着重探讨以下几点内容:

    1. 传统的 Hash 式负载均衡在集群扩缩容时面临的缓存失效问题。
    2. 一致性 Hash 的原理。
    3. Golang 的开源库 GroupCache 如何实现一致性 Hash 。

    点击查看原文: 一致性 Hash 原理及 GroupCache 源码分析

    1 replies    2021-02-22 10:13:40 +08:00
    cyhone
        1
    cyhone  
    OP
       Feb 22, 2021
    原文链接: https://www.cyhone.com/articles/consistent-hash-of-groupcache/
    欢迎关注公众号:编程沉思录
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3034 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 06:45 · PVG 14:45 · LAX 23:45 · JFK 02:45
    ♥ Do have faith in what you're doing.