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
resources:
example:
type: aws:elasticache:Cluster
properties:
engine: memcached
numCacheNodes: 2
azMode: single-az
After
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.