CLUSTER
CLUSTER subcommand [argument ...]
- Group
- Cluster
- Arity
- -2 (at least 2 words, counting the command name)
- Flags
- admin
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CLUSTER is a container command: the first argument names what to do, and
each subcommand has its own page. Together they let you inspect the
topology, assign hash slots, move slots between nodes, add and remove nodes,
and fail over. Tools such as redis-cli --cluster drive these same
subcommands for you; see Clustering for the setup and
operations guide.
Subcommands
Section titled “Subcommands”| Subcommand | What it does |
|---|---|
| CLUSTER ADDSLOTS | Assign hash slots to this node. |
| CLUSTER ADDSLOTSRANGE | Assign ranges of hash slots to this node. |
| CLUSTER BUMPEPOCH | Give this node a new configuration epoch. |
| CLUSTER CANCELSLOTMIGRATIONS | Cancel the atomic slot migrations this node is running as the source. |
| CLUSTER COUNT-FAILURE-REPORTS | Count the live failure reports for a node. |
| CLUSTER COUNTKEYSINSLOT | Count this node’s keys in a slot. |
| CLUSTER DELSLOTS | Unassign hash slots in this node’s view. |
| CLUSTER DELSLOTSRANGE | Unassign ranges of hash slots in this node’s view. |
| CLUSTER FAILOVER | Promote a replica to primary of its shard. |
| CLUSTER FLUSHSLOT | Delete every key of one slot. |
| CLUSTER FLUSHSLOTS | Drop every slot this node owns. |
| CLUSTER FORGET | Remove a node from the cluster. |
| CLUSTER GETKEYSINSLOT | List this node’s keys in a slot. |
| CLUSTER GETSLOTMIGRATIONS | List the atomic slot migrations this node has run or is running. |
| CLUSTER INFO | Cluster state and counters. |
| CLUSTER KEYSLOT | The hash slot of a key. |
| CLUSTER LINKS | The cluster bus connections of this node. |
| CLUSTER MEET | Connect another node to the cluster. |
| CLUSTER MIGRATESLOTS | Move slots to another node in one atomic step (Valkey 9 style). |
| CLUSTER MIGRATION | Import slots, and list or cancel migrations (Redis 8.4 style). |
| CLUSTER MYID | This node’s ID. |
| CLUSTER MYSHARDID | This node’s shard ID. |
| CLUSTER NODES | Every node, in the nodes.conf text format. |
| CLUSTER REPLICAS | The replicas of a primary. |
| CLUSTER REPLICATE | Make this node a replica of a primary. |
| CLUSTER RESET | Reset this node’s cluster state. |
| CLUSTER SAVECONFIG | Write nodes.conf now. |
| CLUSTER SET-CONFIG-EPOCH | Set the configuration epoch of a new node. |
| CLUSTER SETNODENAME | Give this node a human-readable name. |
| CLUSTER SETSLOT | Change a slot’s migration state or owner. |
| CLUSTER SHARDS | The shards, their slots and nodes. |
| CLUSTER SLAVES | Old name of CLUSTER REPLICAS. |
| CLUSTER SLOT-STATS | Per-slot key counts and usage. |
| CLUSTER SLOTS | The slot ranges and the nodes that serve them. |
CLUSTER HELP lists the subcommands with a one-line summary each.
Cluster mode off
Section titled “Cluster mode off”On a server started without cluster-enabled yes, only INFO, MYID,
SLOTS, SHARDS, NODES, LINKS, RESET, HELP, KEYSLOT,
COUNT-FAILURE-REPORTS, COUNTKEYSINSLOT and GETKEYSINSLOT work. Every
other subcommand replies:
(error) ERR This instance has cluster support disabledErrors
Section titled “Errors”| Case | Reply |
|---|---|
| Unknown subcommand | ERR unknown subcommand 'name'. Try CLUSTER HELP. |
| Wrong number of arguments for a subcommand | ERR wrong number of arguments for 'cluster|subcommand' command |
Compatibility
Section titled “Compatibility”The subcommands, reply shapes and error strings follow Redis 7 and
Valkey 8. HotKV also has CLUSTER SLOT-STATS (as in Valkey 8 and Redis 8)
and its own CLUSTER SETNODENAME.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.