Ref: https://learn.cantrill.io/courses/1820301/lectures/41301607
EC2 Placement Groups - Overview
- 💡 The physical placement of an EC2 instance is normally determined by AWS
- usually in the host that makes most sense, within the AZ that the instance is launched in
- đź”§Â Placement groups influence how instances inside a group are placed physically in EC2
- They can ensure that instances are physically together or separated
- 3 types of placement groups:
- Cluster: pack instances physically close together
- Spread: keep instances separated (instances use different underlying HW)
- Partition: instances grouped physically in partitions, but partitions are spread apart
Cluster Placement Groups
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/1100-ADVANCED_EC2/00_LEARNINGAIDS/PlacementGroups-1.png
- đź”§Â Concept: Instances tightly packed together, usually to achieve high performance
- Instances use the same infrastructure rack, and often also the same host
- âť—Â Not all instance types supported
- ❗ Group is launched in a SINGLE AZ → can't span AZs
- 💡 Being in different AZs would degrade performance
- AZ locked when first instance is launched
- Group can span VPC peers… but it significantly impacts performance in a negative way!
- Using same instance type not mandatory, but provides best results
- ‼️ Launching all instances at the same time is highly recommended (best practice)
- Ensures AWS allocates necessary capacity for all that you require
- 💡 Certain capacity provided for first instances, adding more later can be problematic
- 👍 Main benefit: instances get fast & direct BW to all other instances inside the same group
- Highest throughput, lowest latency, maximum pps (packets/s) possible in AWS
- ‼️ Use instances with high performance NWing + enhanced NWing on all instances → maximizes the benefit of this placement group
- Single data stream transfer rate up to 10Gbps (vs normal 5Gbps)
- 💡 some instances have faster rates, but transfer still limited by single stream rate
- 👎 Main drawback: little to no resilience
- if HW fails, it can take down all instances
- Use cases: systems that require high performance, fast speeds & low latency
- e.g. High Performance Compute (HPC) or scientific analysis
Spread Placement Groups