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.

Master

Redis

in Minutes — Grab the Ultimate Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Real-world configs/examples
Handy troubleshooting shortcuts
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

Redis

Cheatsheet

(Perfect for DevOps & SREs)

Most-used commands
Your email is safe with us. No spam, ever.

Thankyou for your submission

We have sent the cheatsheet on your email!
Oops! Something went wrong while submitting the form.

MORE ISSUES

Made with ❤️ in Bangalore & San Francisco 🏢

Doctor Droid