Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

CLUSTER MYSHARDID

Last updated
CLUSTER MYSHARDID
Group
Cluster
Complexity
O(1)
Arity
2 (exactly, counting the command name)
HotKV Cloud
Not available
On-Premise
no license needed

CLUSTER MYSHARDID returns the ID of the receiving node’s shard: a primary and its replicas share one shard ID, 40 hexadecimal characters. The ID stays with the shard through failovers, so it is a stable name for “the nodes that serve these slots”. CLUSTER SHARDS lists the same IDs.

A bulk string in RESP2 and RESP3. With cluster mode off: ERR This instance has cluster support disabled.

127.0.0.1:6379> CLUSTER MYSHARDID
"2628190a08e92e42a2709833fd2f26ea9331c999"

Same as Redis 7.2 and Valkey 8.

CLUSTER MYID, CLUSTER SHARDS

In a cluster: Monitoring a cluster