Question

How to test the Redis automatic failover?

I am testing DigitalOcean Managed Redis Database and I would like to test the automatic failover feature. It is mentioned in the docs that one can initial a failover using the FAILOVER command.

I am connecting to master with redli, but unfortunately neither FAILOVER nor other commands with @admin ACL seem to be unrecognized:

> FAILOVER
(error) ERR unknown command 'FAILOVER', with args beginning with:

This behavior makes me conclude that the default user does not have enough permissions to execute such commands.

I tried to fiddle with CLIENT PAUSE , ACL and even doctl database user, but no luck. Am I missing something? What is the recommended way to simulate a failover?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
January 12, 2024
Accepted Answer

Hi there,

Testing the automatic failover feature of DigitalOcean’s Managed Redis Database requires a bit of finesse, as you’ve noticed. The default user in a managed Redis instance typically doesn’t have permissions to execute commands like FAILOVER, which are reserved for administrative purposes. This limitation is in place for security and stability reasons.

If the primary node fails, a standby node is automatically promoted to replace it but you can not trigger this on demand.

If you need a more controlled and safe way to test failover, consider reaching out to DigitalOcean’s support team. They may provide insights or methods for testing specific to the Managed Redis service which is not available out of the box.

https://www.digitalocean.com/support/

Hope that helps!

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel