Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between AWS ElastiCache Cluster and AWS ElastiCache Replication Group?

On terraform/cloudformation documentation there are two different resources to create an ElastiCache Redis instance:

  1. aws_elasticache_cluster (https://www.terraform.io/docs/providers/aws/r/elasticache_cluster.html)
  2. aws_elasticache_replication_group (https://www.terraform.io/docs/providers/aws/r/elasticache_replication_group.html)

What is the difference between these two? Which one should I choose?

like image 605
darkcode Avatar asked Oct 12 '19 17:10

darkcode


1 Answers

Simply, the replication group is for the Redis cluster and the cache cluster is for the Memcache. You cannot apply the command to the others, i.e. cache cluster for Redis cluster and vice versa.

The redis also can use aws_elasticache_cluster but only if when redis has node 1, that is not a cluster mode.

num_cache_nodes – (Required unless replication_group_id is provided) The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. If this number is reduced on subsequent runs, the highest numbered nodes will be removed.

like image 132
Lamanus Avatar answered Sep 18 '22 20:09

Lamanus