CLUSTER MYSHARDID
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.
Return value
Section titled “Return value”A bulk string in RESP2 and RESP3. With cluster mode off:
ERR This instance has cluster support disabled.
Examples
Section titled “Examples”127.0.0.1:6379> CLUSTER MYSHARDID"2628190a08e92e42a2709833fd2f26ea9331c999"Compatibility
Section titled “Compatibility”Same as Redis 7.2 and Valkey 8.
See also
Section titled “See also”In a cluster: Monitoring a cluster
Was this page helpful?
Thanks for the feedback.