Section: Cluster basics

Count keys in a slot

bash
bash
CLUSTER COUNTKEYSINSLOT 1234

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Cluster basics
Compute key hash slot
Compute the cluster slot for a key.
OpenIn sheetbashsame section
Inspect cluster state
Read cluster state, slot coverage, and message counters.
OpenIn sheetbashsame section
List cluster nodes
Show known cluster nodes and flags.
OpenIn sheetbashsame section
Inspect slot mapping
Return slot-to-node ownership information.
OpenIn sheetbashsame section
Allow replica reads in cluster mode
Tell a cluster replica connection to serve reads.
OpenIn sheetbashsame section
Return to normal read/write routing
Disable READONLY mode on a cluster connection.
OpenIn sheetbashsame section