Review Availability Zone distribution for ElastiCache Memcached

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

Description

Placing two or more ElastiCache Memcached nodes in one Availability Zone exposes those nodes to the same zonal outage. Distributing nodes across zones reduces the number affected by a single-zone failure.

Potential impact

  • Losing cache nodes during a zonal outage can sharply increase cache misses and reduce performance.
  • Extra load on the source data store can slow application responses.

Remediation

For Memcached deployments that need multiple zones, configure at least two nodes and set azMode to cross-az. Check the subnet group and node placement, along with client handling of node failures and cache rebuilding.

Examples

These excerpts compare Memcached node placement. Configure the node type, subnet group and other creation settings separately.

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

cross-az distributes nodes across Availability Zones. It does not replicate data between Memcached nodes or automatically restore lost cache contents.

References