consistenthash
Consistent hashing is a special kind of hashing technique used in distributed systems. Its primary goal is to minimize data remapping when the number of servers in a distributed hash table (DHT) or cache changes. Traditional hashing methods, like simple modulo operations, require a complete redistribution of data across all servers when a server is added or removed. This can be very inefficient, especially for large datasets.
Consistent hashing addresses this by mapping both servers and data items onto a ring, typically a circle
The key advantage of consistent hashing is its ability to maintain a relatively stable mapping of keys