The following list shows there are 10 shards in the Elasticache cluster. And each cluster has two nodes, they are all in one REplicationGroup. Auto-failover is enabled and Multi-AZ is disabled.
However, only us-east-1a
and us-east-1a
are used. us-east-1c
and us-east-1d
are not used. How to evenly distribute the nodes to the four AZs? (AWS cli or console)
"CacheClusterId","PreferredAvailabilityZone","ReplicationGroupId"
'abcde1234-0001-001', 'us-east-1a', 'abcde1234'
'abcde1234-0002-001', 'us-east-1a', 'abcde1234'
'abcde1234-0001-002', 'us-east-1b', 'abcde1234'
'abcde1234-0002-002', 'us-east-1b', 'abcde1234'
'abcde1234-0003-001', 'us-east-1b', 'abcde1234'
'abcde1234-0003-002', 'us-east-1a', 'abcde1234'
'abcde1234-0004-001', 'us-east-1b', 'abcde1234'
'abcde1234-0004-002', 'us-east-1a', 'abcde1234'
'abcde1234-0005-001', 'us-east-1a', 'abcde1234'
'abcde1234-0005-002', 'us-east-1b', 'abcde1234'
'abcde1234-0006-001', 'us-east-1b', 'abcde1234'
'abcde1234-0006-002', 'us-east-1a', 'abcde1234'
'abcde1234-0007-001', 'us-east-1a', 'abcde1234'
'abcde1234-0007-002', 'us-east-1b', 'abcde1234'
'abcde1234-0008-001', 'us-east-1b', 'abcde1234'
'abcde1234-0008-002', 'us-east-1a', 'abcde1234'
'abcde1234-0009-001', 'us-east-1b', 'abcde1234'
'abcde1234-0009-002', 'us-east-1a', 'abcde1234'
'abcde1234-0010-001', 'us-east-1a', 'abcde1234'
'abcde1234-0010-002', 'us-east-1b', 'abcde1234'
Should Multi-AZ be enabled?
CodePudding user response:
New Cluster
To evenly distribute the nodes of an Elasticache cluster across different AZs, you can use the Multi-AZ with Automatic Failover
option when creating the cluster. This will ensure that the nodes are evenly distributed across the available AZs. Additionally, you can use the "Modify Cluster" option to manually adjust the number of nodes in each AZ.
Existing Cluster
To evenly distribute the nodes of an existing Elasticache cluster
across different AZs, you can use the Modify Cache Cluster
API or the AWS Management Console. In the API, you can specify the number of nodes you want in each AZ. In the console, you can select the AZs you want to use and then specify the number of nodes you want in each AZ.