Skip to content

Archive

Hashing

4 articles
Software Engineering 22 Sep 2026 6 min read

Rendezvous Hashing Limits Key Movement During Membership Changes

Rendezvous Hashing Limits Key Movement During Membership Changes A partitioning rule has two jobs that can pull in different directions. It should spread keys across available nodes, and it should avoid moving most keys when that node set changes. A simple modulo rule handles the first job well for a stable cluster but performs poorly at the second. Rendezvous hashing, also called highest-random-weight hashing, assigns every key a deterministic score for every eligible node. The node with the highest score owns the key. Adding or removing a node changes only the comparisons involving that member, so keys with unaffected winners keep their placement.

Software Engineering 22 Sep 2026 7 min read

Consistent Hashing Limits Key Movement During Topology Changes

Consistent Hashing Limits Key Movement During Topology Changes A distributed cache or partitioned service needs a rule that maps each key to a node. A simple rule such as hash(key) % N is attractive while the node count stays fixed. The trouble appears when N changes. Moving from four nodes to five changes the divisor for every key. Most remainders change, so a routine capacity adjustment can remap a large share of the dataset at once. For a cache, that can trigger a wave of misses. For stateful storage, it can create a large migration job.

Software Engineering 20 Sep 2026 6 min read

Rendezvous Hashing Keeps Key Placement Stable as Nodes Change

Rendezvous Hashing Keeps Key Placement Stable as Nodes Change Distributed systems often need a deterministic answer to a placement question: given a key and a current set of nodes, which node owns the key? A simple modulo rule such as hash(key) % N is compact, but changing N can move a large fraction of keys at once. Rendezvous hashing, also called highest-random-weight hashing, uses a different rule. For each key, it computes a deterministic score for every eligible node and selects the node with the highest score. Adding or removing a node changes placement only for keys whose ranking is affected by that membership change.

Python 03 Sep 2026 11 min read

Design Hashable Python Objects Correctly

Python dictionaries and sets make lookups feel simple: give them a key or value, and they can usually find it quickly. That convenience depends on a contract that becomes important as soon as you create your own value-like classes. A dictionary key is not located by equality alone. Python first uses the object’s hash value to narrow the search, then uses equality to distinguish candidates that land in the same area of the hash table.