The email sent will contain a link to this article, the article title, and an article excerpt (if available). For security reasons, your IP address will also be included in the sent email.
This is a guest article by NK. You can view the original article Consistent hashing explained on systemdesign.one website.
At a high level, consistent hashing performs the following operations:
- The output of the hash function is placed on a virtual ring structure (known as the hash ring)
- The hashed IP addresses of the nodes are used to assign a position for the nodes on the hash ring
- The key of a data object is hashed using the same hash function to find the position of the key on the hash ring
- The hash ring is traversed in the clockwise direction starting from the position of the key until a node is found
- The data object is stored or retrieved from the node that was found