Memcached nodes placed in one Availability Zone

Spread Memcached nodes across Availability Zones to reduce the impact of a zone failure.

Description

For Memcached, AZMode: cross-az places newly created cache nodes across Availability Zones. Existing nodes stay in their current zones.

Potential impact

If every node is in one zone, an outage there can remove the entire cache and increase load on the backing store.

Remediation

For at least two nodes, use a subnet group spanning multiple zones. If you specify PreferredAvailabilityZones, list one zone per node and at least two distinct zones. If all existing nodes are in one zone, add nodes in another eligible zone and verify their placement.

Examples

The second excerpt distributes three nodes at creation. Supply a node type. Memcached data is not replicated between the nodes.

Before

yaml
Resources:
  CacheCluster:
    Type: AWS::ElastiCache::CacheCluster
    Properties:
      Engine: memcached
      NumCacheNodes: 3
      AZMode: single-az

After

yaml
Resources:
  CacheCluster:
    Type: AWS::ElastiCache::CacheCluster
    Properties:
      Engine: memcached
      NumCacheNodes: 3
      AZMode: cross-az

References