CLUSTER REPLICAS
CLUSTER REPLICAS node-id
- Group
- Cluster
- Complexity
- O(N) where N is the number of known nodes
- Arity
- 3 (exactly, counting the command name)
- HotKV Cloud
- Not available
- On-Premise
- no license needed
CLUSTER REPLICAS returns the replicas of the given primary, as the
receiving node knows them. Each replica is described by its line in the
CLUSTER NODES format.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| A primary | Array of bulk strings, one line per replica (empty when it has none) | Array |
| Unknown node ID | Error ERR Unknown node <node-id> |
Same error |
| The node is a replica | Error ERR The specified node is not a master |
Same error |
With cluster mode off: ERR This instance has cluster support disabled.
Examples
Section titled “Examples”127.0.0.1:6379> CLUSTER REPLICAS b4240bf759694b9ba85b3b5efd51785b86261c3e1) "80c69623243ebb98309adbe1d4c95f7857e37c2c 10.0.0.4:6379@16379 slave b4240bf759694b9ba85b3b5efd51785b86261c3e 0 1790850431525 1 connected"127.0.0.1:6379> CLUSTER REPLICAS 80c69623243ebb98309adbe1d4c95f7857e37c2c(error) ERR The specified node is not a masterCompatibility
Section titled “Compatibility”Same replies and error strings as Redis 7 and Valkey 8. CLUSTER SLAVES is the older name of the same command.
See also
Section titled “See also”CLUSTER NODES, CLUSTER REPLICATE, CLUSTER SHARDS
In a cluster: Monitoring a cluster
Was this page helpful?
Thanks for the feedback.