When a new node is added on the hash ring, which keys move?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

When a new node is added on the hash ring, which keys move?

Explanation:
In consistent hashing on a hash ring, each key is assigned to the first node encountered when moving clockwise from the key’s hash, so a node owns the keys whose hashes fall in the arc from its predecessor up to the node itself. When a new node is added between its predecessor and successor, only the keys that hash into the arc between the predecessor and the new node now belong to the new node (they move from the successor to the new node). All other keys keep their current owners. So, the keys that move are exactly those that fall in the arc between the new node and its counter-clockwise neighbor. This minimizes rehashing, since only a small portion of keys reassign.

In consistent hashing on a hash ring, each key is assigned to the first node encountered when moving clockwise from the key’s hash, so a node owns the keys whose hashes fall in the arc from its predecessor up to the node itself. When a new node is added between its predecessor and successor, only the keys that hash into the arc between the predecessor and the new node now belong to the new node (they move from the successor to the new node). All other keys keep their current owners. So, the keys that move are exactly those that fall in the arc between the new node and its counter-clockwise neighbor. This minimizes rehashing, since only a small portion of keys reassign.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy