# CLUSTER MYSHARDID

> Return the ID of the shard the receiving node belongs to.

URL: https://docs.hotkv.com/commands/cluster-myshardid/

```
CLUSTER MYSHARDID
```

- Group: Cluster
- Complexity: O(1)
- 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](https://docs.hotkv.com/commands/cluster-shards/index.md) lists the same
IDs.

## Return value

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

## Examples

```
127.0.0.1:6379> CLUSTER MYSHARDID
"2628190a08e92e42a2709833fd2f26ea9331c999"
```

## Compatibility

Same as Redis 7.2 and Valkey 8.

## See also

[CLUSTER MYID](https://docs.hotkv.com/commands/cluster-myid/index.md), [CLUSTER SHARDS](https://docs.hotkv.com/commands/cluster-shards/index.md)

In a cluster: [Monitoring a cluster](https://docs.hotkv.com/clustering/monitoring/index.md)