Back to results for “Redis Backup & Disaster Recovery”
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?

Advanced

Answer

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:6379
Real-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.

Common follow-ups: How long does resharding typically take for a large amount of data?;What precautions should be taken before starting a resharding operation in production?