MOVED means a slot now belongs to another node for good. ASK is a one-time redirect while a slot is being moved.
MOVED <slot> <host:port> appears after a slot changes owner, for example after resharding or failover. The client should:
- resend the command to that node
- update its slot map, often by reloading the whole map with
CLUSTER SHARDSorCLUSTER SLOTS
Then later commands go straight to the right node.
ASK <slot> <host:port> appears while a slot is being migrated, when the key you asked for has already moved to the target node. The client sends ASKING and then the command to the target node. It does not update its slot map. Why? The slot still officially belongs to the source node until the migration finishes.
Cluster-aware clients like ioredis handle both automatically. If you see many MOVED replies, the client's slot map is out of date.
MOVEDmeans the slot's owner changed for good.- On
MOVED, retry on the new node and update the slot map. ASKmeans the slot is mid-migration, so it is a one-time redirect.- On
ASK, sendASKINGthen the command, and keep the old slot map. - Cluster-aware clients handle both redirects automatically.