Question: What does "Redis cluster enabled 0" mean?

Answer

"Redis cluster enabled 0" means that the Redis instance you're connected to is not operating in cluster mode. This could be due to the configuration of the Redis server or because you're using a version of Redis that doesn't support clustering.

In Redis, cluster mode allows for data sharding across multiple Redis nodes, providing improved performance and higher availability. However, enabling cluster mode requires a different set-up and has implications for how you interact with the Redis database.

Here's an example of how you can check whether Redis is running in cluster mode:

redis-cli info server | grep cluster_enabled

This command will return cluster_enabled:1 if the server is running in cluster mode, and cluster_enabled:0 if it isn't.

If you want to run your Redis server in cluster mode, you need to enable it in the redis.conf file:

cluster-enabled yes

After making changes to the configuration file, you'll need to restart the Redis server for changes to take effect. Please note that turning on cluster mode will affect how you interact with your Redis instance. For example, commands that operate on multiple keys may not work as expected if those keys are stored on different nodes.

Was this content helpful?

Start building today

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.