KeyValueStore Hash Slot Calculator How to use it

Find a key's slot

A cluster splits its keys into 16,384 slots and gives each primary a share of them. Type a key to see its slot and the primary that holds it.

Check a command

A command that touches several keys only runs when every key is in the same slot. Otherwise the cluster answers CROSSSLOT. Paste a command to check it before your code sends it.

Quote arguments with spaces, as in redis-cli: MGET "my key" other

See how many keys spread

Paste a list of keys, one per line, or load a file. The output of redis-cli --scan or valkey-cli --scan works as it is, and so does quoted output such as 1) "user:42".

Cluster layout

Which primary owns which slots. The answers above use this layout.

primaries, split the way --cluster create splits them