Loading topic
hash(key) mod N for picking a node. The hash ring in later chapters depends on one component more than any other: the hash function. A poor choice makes the whole scheme unreliable.3 min readhash(key) mod N remaps most keys when N changes, and that you can read short Python programs. It introduces the data structure that fixes the remapping problem. The next chapter covers the lookup procedure in detail.3 min readbisect and with the idea that a node owns the arc of the ring that ends at its position.3 min readHashRing class and _hash function from the previous chapter. It also assumes you know what a replica is: a copy of a key's data on another node.3 min read