Search code examples
redisamazon-elasticache

Does numNodeGroups:2 in ElastiCache violate Redis minimal cluster recommendation


The Redis Cluster documentation states:

Note that the minimal cluster that works as expected must contain at least three master nodes. For deployment, we strongly recommend a six-node cluster, with three masters and three replicas.

Source

Does that mean setting numNodeGroups:2 for an ElastiCache Redis cluster violates the minimal cluster recommendation? Can that result in unexpected behavior?


Solution

  • In OSS Redis, having less then three shards affects availability due to the cluster-bus gossip protocol that requires a clear majority to detect unhealthy nodes.

    However, for ElastiCache this is not the case. According to the Amazon ElastiCache SLA page setting up a cluster with less than three shards does not harm availability given you have at least one replica. The SLA page defines four possible configurations, each of which has its own SLA commitment. In order to get 99.99% availability SLA commitment all you need to do is to define a number of replicas >= 1, and enable Multi-AZ for the cluster. Bottom line, the number of primary nodes does not matter.

    You can read further about availability in the Amazon ElastiCache documentation.