Database / REDIS
Explain the execution flow of a Redis Cluster request with a MOVED redirection?
A cluster-aware client doesn't need to know in advance exactly which node owns every key, but it does need to handle being told it guessed wrong, which is what the MOVED response mechanism exists for.
Well-behaved cluster clients cache the slot-to-node mapping after learning it, so a MOVED redirection typically only happens once per stale mapping, not on every single request — the client corrects its cache and future requests for that slot go directly to the right node. A related response, ASK, appears specifically during live slot migration between nodes: it tells the client to retry the command against a different node for this one request only, without permanently updating its cached mapping, since the migration might not be finished yet.
More Related questions...
