The cluster slots page allows you to edit the mapping of slots to masters using a visual interface.
All masters known by the cluster are displayed including the assigned slots.
Redis Cluster uses the concept of “slots” to shard data stored within the cluster. There are 16,384 slots and the members of the cluster divide up the responsibility of handling them. Any time a command is executed, the key involved is mapped to a single slot and thus a single node to handle the command. Redis Cluster uses a gossip protocol to communicate slot assignment changes among the cluster.
On the left side, all masters known by the cluster are displayed. They are shown in slot assignment order and each assigned a color for representation on the slot map.
Expand the slot range.
Migrate all slots to another master.
The slot map is a visual representation of all 16,384 slots covered by a Redis Cluster.
Each of the 16,384 slots in the cluster is displayed, in a 128x128 grid beginning at slot 0 in the top left corner and ending at slot 16,383 in the bottom right. The primary hue of the cell indicates which master is currently assigned to handle the slot. The darkness is a relative measure of how many keys are present in the slot.
Click and drag to select slots or ranges of slots to view the number of keys present.
Migrate the selected slots to another master.
Migrate all slots evenly across cluster masters.
Redis Cluster is capable of migrating slots from one master to another without interrupting any access to the contained data. With the cluster slots page, you can use this feature of Redis Cluster to manage which masters are serving which slots. You can horizontally scale your cluster up or down with no downtime.
Reddie collaborates between two nodes to conduct the migration. For each slot in the migration:
CLUSTER SETSLOT IMPORTINGcommand.
CLUSTER SETSLOT MIGRATINGcommand to inform it to begin redirecting queries to the new master. At this point all new keys will be created at the destination and queries for keys that are not yet present will be redirected to the source.
CLUSTER GETKEYSINSLOTare migrated in batches using
MIGRATEuntil none remain.
CLUSTER SETSLOT NODE.
The migration plan dialog allows you to select ranges of slots and destinations to migrate them to.
Enter a range of slots and a destination master and Reddie will present a migration plan for your review.
Confirming this dialog will begin the slot migration.
While a migration is in progress, a status drawer will appear at the bottom.
The top progress bar represents progress through the keys of the current slot. The bottom progress bar represents progress through all of the slots in the current migration.
Click the View details link to see additional information about the migration including a detailed log of all commands used. These migration logs are also saved to disk.
When the migration is complete, before another can be started, you must dismiss the migration to confirm it.