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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ