CLUSTER MYID
CLUSTER MYID
- Group
- Cluster
- Complexity
- O(1)
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CLUSTER MYID returns the receiving node’s ID: 40 hexadecimal characters
that identify the node across the cluster. A node keeps its ID, which is
saved in nodes.conf, until a CLUSTER RESET HARD
gives it a new one. You pass this ID to commands such as
CLUSTER REPLICATE,
CLUSTER FORGET and
CLUSTER SETSLOT.
The command also answers with cluster mode off.
Return value
Section titled “Return value”A bulk string in RESP2 and RESP3.
Examples
Section titled “Examples”127.0.0.1:6379> CLUSTER MYID"b4240bf759694b9ba85b3b5efd51785b86261c3e"Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”CLUSTER MYSHARDID, CLUSTER NODES
In a cluster: Monitoring a cluster
Was this page helpful?
Thanks for the feedback.