txdat's notes

Home

❯

computer-science

❯

distributed

❯

consistent-hashing

consistent-hashing

Jul 26, 20261 min read

Consistent Hashing

consistent hashing.excalidraw

highscalability blog systemdesign.one blog

Hash Ring

Virtual Nodes

  • adding 1 node to 5-node ring remaps ~17% of keys
  • virtual nodes reduce load imbalance to <5%

Implementation

  • ring.AddNode(id, tokens)
  • ring.GetNode(key)

Graph View

  • Consistent Hashing
  • Hash Ring
  • Virtual Nodes
  • Implementation

Created with Quartz v5.0.0 © 2026

  • GitHub
  • Obsidian