Redis Cluster uses which hashing approach?

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

Redis Cluster uses which hashing approach?

Explanation:
Redis Cluster uses a fixed set of hash slots to map keys. There are 16384 slots, and a key is assigned to a slot by taking CRC16(key) and computing the remainder modulo 16384. Each cluster node owns a subset of these slots, and requests are routed to the node that holds the slot for the key. This design makes scaling and rebalancing efficient because you only move entire slots between nodes when nodes are added or removed, rather than redistributing individual keys. This differs from ring-based consistent hashing, which places keys on a continuous ring and uses virtual nodes to balance load; Redis’ fixed-slot approach provides a stable, predictable division of responsibility. A random distribution wouldn’t provide reliable routing, and partition maps keyed by the client would delegate routing decisions away from the cluster’s coordinated mechanism, undermining locality and balance.

Redis Cluster uses a fixed set of hash slots to map keys. There are 16384 slots, and a key is assigned to a slot by taking CRC16(key) and computing the remainder modulo 16384. Each cluster node owns a subset of these slots, and requests are routed to the node that holds the slot for the key. This design makes scaling and rebalancing efficient because you only move entire slots between nodes when nodes are added or removed, rather than redistributing individual keys.

This differs from ring-based consistent hashing, which places keys on a continuous ring and uses virtual nodes to balance load; Redis’ fixed-slot approach provides a stable, predictable division of responsibility. A random distribution wouldn’t provide reliable routing, and partition maps keyed by the client would delegate routing decisions away from the cluster’s coordinated mechanism, undermining locality and balance.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy