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.

gefragt vor 2 Jahren257 Aufrufe
1 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen