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.

질문됨 2년 전257회 조회
1개 답변
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
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠