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.

ASKING

Last updated
ASKING
Group
Cluster
Complexity
O(1)
Arity
1 (exactly, counting the command name)
Flags
fast
HotKV Cloud
All plans
On-Premise
no license needed

While a slot moves from one node to another, the source node answers a command on a key that has already moved with -ASK <slot> <ip>:<port>. The client then sends ASKING to the node named in the redirect, followed by the command. ASKING lets that one next command run even though the target only imports the slot and does not own it yet. The flag is cleared after the next command.

Unlike -MOVED, an -ASK redirect is temporary: the client keeps sending other commands for the slot to the source node until the move is done. Cluster-aware clients, including every HotKV SDK and redis-cli -c, handle this for you.

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

10.0.0.1:6379> GET user:1000
(error) ASK 1649 10.0.0.2:6379
10.0.0.2:6379> ASKING
OK
10.0.0.2:6379> GET user:1000
"alice"

Same as Redis 7 and Valkey 8.

CLUSTER SETSLOT, MIGRATE, READONLY, Clustering: Slots and redirects