← All insights
ENGINEERING JOURNAL / Database Operations

Redis Cluster: Decode MOVED, ASK and CROSSSLOT Errors

Follow Redis Cluster errors through client slot routing, migration redirections, advertised endpoint reachability, and multi-key placement rules.

Redis Cluster: Decode MOVED, ASK and CROSSSLOT ErrorsRedis Cluster: Decode MOVED, ASK and CROSSSLOT Errors — conceptual 3D-style vector showing Cluster client, Slot map, Owning node, Key placement, Migration redirect.. Conceptual teaching illustration; connections show the investigation flow rather than a vendor deployment topology.CLOUVENIX / DATABASE OPERATIONSRedis Cluster: Decode MOVED, ASK and CROSSSLOT Errors01Cluster client02Slot map03Owning node04Key placement05Migration redirectConceptual investigation flow / Redis Cluster: Decode MOVED, ASK and CROSSSLOT Errors
Redis Cluster: Decode MOVED, ASK and CROSSSLOT Errors — conceptual 3D-style vector showing Cluster client, Slot map, Owning node, Key placement, Migration redirect.

Context

Redis Cluster assigns keys to hash slots and distributes those slots across nodes. A cluster-aware client uses that mapping to route commands. Some errors are directions for the client, while others reveal an incompatible multi-key operation. Identify which condition you have before changing the cluster or adding retries.

Prerequisites

Collect Redis and client-library versions, connection mode, seed endpoints, advertised node addresses, recent resharding or failover events, and a sanitized failing command shape. Key names can contain business identifiers, so use protected diagnostics. Obtain read access to cluster topology. Reproduce errors with synthetic keys in staging rather than running a migration or multi-key write against production as a test.

Follow the routing decision

  1. Confirm that the application uses the library's Redis Cluster mode. A standalone client may successfully connect to a seed node yet expose redirections directly to the application. Inspect current topology using supported read-only commands such as CLUSTER SHARDS on versions that provide it. Confirm that every advertised destination is reachable from the application network.
  2. Classify redirections correctly. MOVED points toward a slot's owner and normally leads the client to refresh its mapping. ASK is a temporary direction associated with migration and has different per-command handling. A library that treats them identically can behave incorrectly during resharding even when ordinary steady-state queries work.
  3. For CROSSSLOT, inspect the complete key set used by the command or script. Commands needing several keys generally require compatible slot placement. Use read-only CLUSTER KEYSLOT checks with synthetic names to test the naming design. Hash tags can place related keys together, but placing an entire application's keys under one tag can concentrate demand on one slot.
  4. Test the correction with representative cluster events. Upgrade or configure the client if redirection support is missing, repair advertised endpoints if destinations are unreachable, or redesign multi-key boundaries when placement is incompatible. Do not manually move slots or force cluster-state changes merely to suppress an application routing error.

Diagnostic table

Error or symptomMeaning to investigateUseful correction
MOVED reaches application codeClient routing is incompleteEnable supported cluster handling
ASK fails only during migrationTemporary redirect path brokenVerify library migration behavior
CROSSSLOT repeats unchangedKeys do not share required placementReview key and operation design
Redirect points to unreachable addressAdvertised route differs from client pathFix node reachability or advertisement

Illustrative scenario

An application performs a multi-key inventory update using keys with unrelated names. It works against a standalone development server but fails with CROSSSLOT in the cluster. The team models a bounded inventory unit and tests a shared hash tag for keys that truly need one atomic operation. It separately evaluates distribution so the fix does not place all inventory traffic in one slot.

Correct and verify

In staging, test normal routing, a stale client map, planned resharding, reconnect, and the intended multi-key operations. Verify bounded retries and a useful application error when an operation cannot meet placement rules. Confirm that all advertised endpoints remain reachable after failover. One successful read through a seed node does not establish a healthy cluster client.

Operating procedure

Monitor redirection errors by client version, destination reachability, and slot-placement failures by command family. Review key naming and script key declarations during application changes. Keep resharding acceptance checks in the runbook so temporary routing behavior receives the same attention as normal traffic.

Explore Clouvenix database administration for implementation and operational handover.

Technical reference