- Newest
- Most votes
- Most comments
The inconsistency you're experiencing is due to a specific constraint with ElastiCache for Redis (cluster mode enabled): you cannot create a cluster mode enabled setup with auto-failover disabled.
While the documentation mentions that you can have "90 shards and 0 replicas" in a cluster mode enabled configuration, there's an important distinction to make. For Valkey or Redis OSS (cluster mode enabled), you can technically have zero replicas per shard, but automatic failover must still be enabled.
The reason for this requirement is that cluster mode enabled is designed with high availability in mind. Even though you can configure it with zero replicas, the automatic failover feature must be enabled as part of the cluster mode enabled architecture. Without replicas, you won't actually be able to failover to a replica if your primary node fails, but the setting must still be enabled.
For your specific use case, if you want to create a cost-effective or testing environment with cluster mode enabled, you must:
- Set AutomaticFailoverEnabled to true
- You can keep ReplicasPerNodeGroup at 0
- Maintain your NumNodeGroups at 2 or whatever number of shards you need
This configuration will allow you to create a cluster mode enabled setup with multiple shards and no replicas, though you should be aware that without replicas, you won't have failover capability despite the setting being enabled.
Sources
Valkey or Redis OSS nodes and shards - Amazon ElastiCache
CreateReplicationGroup - Amazon ElastiCache
ConfigureShard - Amazon ElastiCache
Relevant content
- asked 2 years ago
- asked a year ago
