Dragonfly Cloud is now available in the AWS Marketplace - learn more

Question: What is the difference between Redis cluster mode enabled and disabled?

Answer

Redis cluster mode refers to the operational state of a Redis deployment where multiple Redis nodes form a distributed system. When you enable Redis cluster mode, data is automatically sharded across multiple Redis nodes, and the system provides you with high availability and scalability. In contrast, when Redis cluster mode is disabled, you're operating a standalone or replicated Redis instance without automatic data sharding.

Cluster Mode Enabled

With cluster mode enabled, your data gets partitioned across multiple shards. Each shard holds a subset of your data. This way, Redis can deliver higher performance and capacity by spreading data and requests across multiple nodes. The downside of this setup might be increased complexity in managing and maintaining the cluster. Here is how you start Redis in cluster mode:

redis-server --cluster-enabled yes

Cluster Mode Disabled

When you disable Redis cluster mode, all your data resides on a single Redis node (standalone) or is replicated onto multiple nodes (replication). This mode is simpler to manage and can be sufficient for applications with moderate data size and performance requirements. However, it does not take full advantage of scaling across multiple nodes. Here's how you run Redis without cluster mode:

redis-server --cluster-enabled no

In a nutshell, the choice between enabling or disabling Redis cluster mode comes down to your application's needs for scalability, high availability, and management complexity.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Switch & save up to 80% 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost