In AWS do VMs in placement group get built in different availability zone

0

In AWS we have a requirement to build VMs with terraform and increase the count of VMs if the utilisation increases. I have couple of questions in regards to this:

  1. If we place VMs in same placement group then does it ensure that they are built in different availability zones in the region (as we only want them to be in our local region). Or is there a better way of ensuring this so that I don't have to specify Availability zone for each VM manually in Terraform code and yet achieve equal distribution of VMs in availability zones?

  2. How can i use the "count" feature in terraform to increase the count of these VMs? I have created backup vault and monitoring with cloudwatch. I also need to ensure that each subsequent VM that gets added is automatically added to these as well.

asked 2 years ago251 views
1 Answer
0

It's unclear how you are scaling your farm, but it appears you are relying on Terraform for that scaling. I would suggest that you use auto scaling groups instead. You can specify which AZs (via subnets) you spin up instances within: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html It is part of the service to keep the subnets balanced.

A placement group is to place instances physically close together for lowest latency between the instances. This is commonly used for HPC, Map Reduce, and other cluster compute applications. These are located within an Availability Zone: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html

profile pictureAWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions