A Simple Implementation Of Consistent Hashing
2 min readMar 11, 2022
Let’s say that you have M tasks, and you want to distribute to N servers. Here is the interface of the class we are going to build:
We have a class called ConsistentMap and a get operation where we want to get an assigned server that we want to execute the task.