SECTION VIDEOHash space and hash ring
COMING SOONVideo coming soon. Start with the reading below.
Now we understand the definition of consistent hashing, let us find out how it works. Assume SHA-1 is used as the hash function f, and the output range of the hash function is: x0, x1, x2, x3, ..., xn. In cryptography, SHA-1’s hash space goes from 0 to 2^160 - 1. That means x0 corresponds to 0, xn corresponds to 2^160 – 1, and all the other hash values in the middle fall between 0 and 2^160 - 1. Figure 5-3 shows the hash space.

By collecting both ends, we get a hash ring as shown in Figure 5-4:

Progress is saved on this device.