TLDR Dev · ARTICLES & TUTORIALS

CONSISTENT HASHING

eli.thegreenplace.net12 min read

Summary from the TLDR Dev newsletter

Consistent hashing is an algorithm that minimizes key recomputation when a hash table's size changes, specifically in distributed caching scenarios. The traditional hashing approach suffers from complete cache invalidation upon node additions or removals. Consistent hashing maps both nodes and items onto a circle, assigning items to the nearest node clockwise, limiting the impact of node changes.