stewart99
stewart99

Reputation: 14984

AWS elasticache redis replication groups, cache clusters, cluster mode enabled/disabled configuration

There have been some additions to the AWS::Elasticache::ReplicationGroup resource since I last looked at it with Redis 2.8. With Redis 2.8, I enabled a master with a read replica using DNS failover by specifying the NumCacheClusters parameter in cloudformation to 2, and setting the PreferredCacheClusterAZs so that the replica is not in the same AZ as the master. Now with Redis 3.2 and cluster mode, there is NumNodeGroups which is in Redis-speak, a shard, with optional 0-5 replicas per shard. What I am confused about is then what does NumCacheClusters do with cluster mode enabled? Is it a legacy option with Redis 2.8? In the docs it does not say that only NumNodeGroups or NumCacheClusters can be specified at the same time. So what happens if both are say, 2?

Finally, with Redis 2.8 I have always thought AWS::Elasticache::CacheCluster is like a "less managed" version of ReplicationGroup where you specify the number of nodes in the cache cluster NumCacheClusters but there is no primary, replica relationships between the nodes and it's up to the application to figure out where the data goes. I'm not sure if that assumption is correct. And where does it fit now there is cluster mode with replication groups, but not with CacheCluster?

For reference the CloudFormation page for ReplicationGroups.

Upvotes: 2

Views: 2286

Answers (1)

Harmeet Singh
Harmeet Singh

Reputation: 1

As per AWS Elasticache documentation, we can create Redis with either a) cluster mode disabled, Or b) cluster mode enabled. Your question is related to option (b). Please refer to this aws documentation. It can be inferred that NumNodeGroups indicates the number of shards and ReplicasPerNodeGroup indicates replica nodes in each node group.

Upvotes: 0

Related Questions