Redis › Cluster Sharding & Hash Slots
How would you plan and execute resharding a Redis Cluster to add a new node and redistribute existing hash slots?
AdvancedAnswer
You add the new node to the cluster, then use a resharding tool or command to move a portion of hash slots, and the keys within them, from existing nodes to the new node, carefully doing this gradually to avoid overwhelming the cluster with data migration traffic while it continues serving live production requests.
redis-cli --cluster add-node newnode:6379 existingnode:6379
redis-cli --cluster reshard existingnode:6379Real-world example A growing e-commerce platform adds a fourth node to their three node Redis Cluster during a low traffic period, gradually resharding slots to the new node to spread out the increasing data volume without disrupting the live shopping experience.