Review Availability Zone distribution for ElastiCache Memcached

Review failure scope and recovery for a multi-node cache.

Description

An outage in one Availability Zone can take a whole ElastiCache Memcached cluster offline if all nodes run there.

Potential impact

Cache misses can shift requests to the backing store and slow application responses.

Remediation

For at least two nodes, select azMode: cross-az and a subnet group spanning multiple zones. If all existing nodes are in one zone, add nodes in another eligible zone and verify their placement. Test that clients can rebuild lost cache entries after a node failure.

Examples

The excerpts omit the node type and subnet group.

Before

yaml
resources:
  example:
    type: aws:elasticache:Cluster
    properties:
      engine: memcached
      numCacheNodes: 2
      azMode: single-az

After

yaml
resources:
  example:
    type: aws:elasticache:Cluster
    properties:
      engine: memcached
      numCacheNodes: 2
      azMode: cross-az

The second excerpt spreads two new nodes across zones. It neither moves existing nodes nor replicates their data.

References