Like this article? Buy me a coffee. Here’s a problem. I have a set of keys and values. I also have some servers for a key-value store. This could be memcached, Redis, MySQL, whatever. I want to distribute the keys across the servers so I can find them again. And I want to do this without having to store a global directory. One solution is called mod-N hashing. First, choose a hash function to map
![Consistent Hashing: Algorithmic Tradeoffs](https://cdn-ak-scissors.b.st-hatena.com/image/square/7d6693348ed4b5e0a3a1eb2a37dd53a23c8e6f2a/height=288;version=1;width=512/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A1200%2F1%2AzPtGTCNOwu1p3kzn_sZFVQ.png)