Multiple ChoiceBeginner 45s
Consistent hashing vs modulo hashing
A cluster uses hash(key) % N to distribute keys across N cache nodes. What happens when a node is added?
Options
- 1Only the keys mapped to the new node migrate to it, so most keys stay where they already were
- 2The cluster becomes read-only and rejects writes until a full rebalance completes
- 3Every existing key is replicated to all N nodes so any node can serve a lookup
- 4Nearly all keys remap because the modulus changes, causing a mass cache miss
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.