Redis ASK redirection to a different node

The client is being redirected to a different node in the cluster (used in cluster mode).

When you encounter an ASK redirection error in Redis, it indicates that a key has been moved to a different node in a cluster setup due to resharding or other reasons. The immediate action you should take is to follow the redirection by manually connecting to the specified node and reissuing the command there. You can do this by:

  1. Note the IP address and port from the ASK error message.
  2. Connect to the new node using Redis CLI with the command: redis-cli -h <IP address> -p <port>
  3. Before reissuing your original command, you must send an ASKING command to the node. This is required once per connection when an ASK redirection is encountered.
  4. Repeat your original command.

This process is manual and suitable for investigation or a temporary fix. For applications, implementing automatic handling of ASK redirections in your Redis client configuration is recommended.

Never debug

Redis

manually again

Let Dr. Droid create custom investigation plans for your infrastructure.

Start Free POC (15-min setup) →
Automate Debugging for
Redis
See how Dr. Droid creates investigation plans for your infrastructure.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid