Redis hard
During a Redis Cluster slot migration (re-sharding), what is the specific semantic distinction between a `MOVED` and an `ASK` redirection error?
- A They are functionally synonymous; `ASK` is simply the legacy identifier used in older cluster protocol versions.
- B `MOVED` is a permanent redirect to a new owner; `ASK` is a temporary redirect for a key mid-migration.
- C `MOVED` indicates the target node is officially down; `ASK` indicates the node is overloaded and busy.
- D `ASK` forces the client to wrap the query in a `MULTI/EXEC` transaction block to ensure atomic verification.
Answer: B. `MOVED` is a permanent redirect to a new owner; `ASK` is a temporary redirect for a key mid-migration.
During migration, a slot is 'half' moved. `ASK` tells the client: 'The slot is technically mine, but that specific key is already over there. Go query Node B, but don't update your permanent routing table yet.' `MOVED` triggers a full client-side map update.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- If the Redis memory limit is reached, what specific behavior is exhibited by the `allkeys-lru` eviction policy?
- What is the defining characteristic of a Redis 'Set' data type compared to a standard Redis 'List'?
- In the context of Redis messaging, what is the functional definition of the 'Pub/Sub' feature?
- How does the Redis background snapshotting process (`BGSAVE`) leverage the operating system's `fork()` mechanism to minimize memory overhead?
- Why does Redis proactively disconnect a Pub/Sub client that exhibits high 'output buffer' usage relative to its ingestion rate?
- How does a 'Sorted Set' (ZSET) manage its internal membership and ordering differently from a plain Set?