What is a placement group and when would you use one?
BeginnerScenarioEC2, Auto Scaling and Load Balancing
Answer
Situation read → Placement groups control how instances are placed on hardware.
What I'd do →
- Cluster: low latency, high throughput, one AZ (HPC, tightly coupled)
- Spread: each instance on distinct hardware, max 7 per AZ, for critical small groups
- Partition: groups of instances on distinct racks, for Kafka, Cassandra
- Create:
aws ec2 create-placement-group --group-name hpc --strategy cluster
Why → The strategy trades off latency against blast-radius.
Interview tip → Cluster is a single-AZ risk.