Placement Groups Overview
- A Placement Group is a logical grouping of instances within a single Availability Zone and are recommended for applications that benefits from low network latency, high network throughput, or both.
- Placement group don’t span across Availability Zones
- Placement group is only available within a single Availability Zone either in the same VPC or peered VPCs
- Placement group is more of an hint to AWS that the instances need to be launched physically close to each together
- Using placement groups enables applications to participate in a low-latency, 10 Gbps network.
Placement Group Key Points
- Provides Low network latency & high network throughput and is recommened for HPC (High Performance Computing)
- Should be in the same Availability Zone and can’t span multiple AZs
- Should have unique name within AWS account
- To provide the lowest latency, and the highest packet-per-second network performance, choose instance type that supports enhanced networking
- Only Specific Instance types (General Purpose, GPU, Compute, Memory, Storage Optimized – m4.10xlarge, c4.8xlarge, c3.8xlarge, g2.8xlarge, r3.8xlarge, i2.8xlarge, d2.8xlarge) which support 10 Gigabyte network performance can take full advantage of Placement Group
- Placement Groups cannot be merged. Instances in one placement group should be terminated, and then relaunched into an other placement group
- Existing EC2 instance can’t be moved into a Placement Group as it might be physically located away from the existing instances
- For moving an instance into the placement group,
- create an AMI from the existing instance,
- and then launch a new instance from the AMI into a placement group.
- AWS recommends using the same homogenous instance type for all instances in a placement group
- Placement group can span peered VPCs
- When launching an instance in the placement group results in a capacity error, stop and start the instances in the placement group and try to launch the instance again
Placement Groups Best Practices
- Use homogenous instance types
- Launch all the placement group instances at the same time
- Not a best fit for horizontally scalable web services
- Ensure there is enough capacity
- Jumbo frames help to achieve the maximum network throughput possible, and they are recommended for instances collocated inside a placement group
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- What is a placement group?
- A collection of Auto Scaling groups in the same Region
- Feature that enables EC2 instances to interact with each other via high bandwidth, low latency connections
- A collection of Elastic Load Balancers in the same Region or Availability Zone
- A collection of authorized Cloud Front edge locations for a distribution
- In order to optimize performance for a compute cluster that requires low inter-node latency, which feature in the following list should you use?
- AWS Direct Connect
- Placement Groups
- VPC private subnets
- EC2 Dedicated Instances
- Multiple Availability Zones
- What is required to achieve gigabit network throughput on EC2? You already selected cluster-compute, 10GB instances with enhanced networking, and your workload is already network-bound, but you are not seeing 10 gigabit speeds.
- Enable biplex networking on your servers, so packets are non-blocking in both directions and there’s no switching overhead.
- Ensure the instances are in different VPCs so you don’t saturate the Internet Gateway on any one VPC.
- Select PIOPS for your drives and mount several, so you can provision sufficient disk throughput
- Use a placement group for your instances so the instances are physically near each other in the same Availability Zone. (You are not guaranteed 10 gigabit performance, except within a placement group. Using placement groups enables applications to participate in a low-latency, 10 Gbps network)
- You need the absolute highest possible network performance for a cluster computing application. You already selected homogeneous instance types supporting 10 gigabit enhanced networking, made sure that your workload was network bound, and put the instances in a placement group. What is the last optimization you can make?
- Use 9001 MTU instead of 1500 for Jumbo Frames, to raise packet body to packet overhead ratios. (For instances that are collocated inside a placement group, jumbo frames help to achieve the maximum network throughput possible, and they are recommended in this case)
- Segregate the instances into different peered VPCs while keeping them all in a placement group, so each one has its own Internet Gateway.
- Bake an AMI for the instances and relaunch, so the instances are fresh in the placement group and do not have noisy neighbors
- Turn off SYN/ACK on your TCP stack or begin using UDP for higher throughput.
EC2_User_Guide – Placement_Groups