EC2 Placement Groups
Key concepts
Cluster placement group
Spread placement group
Partition placement group
Use cases for each type
Limitations
Overview
A placement group is a logical grouping of EC2 instances that influences how AWS physically places those instances on the underlying hardware. By default, AWS spreads your instances across the hardware in an Availability Zone to balance load, but a placement group lets you override that behavior to optimize for network performance, for hardware fault isolation, or for a mix of both. There are three strategies: cluster, spread, and partition. Placement groups themselves carry no additional charge; you pay only for the EC2 instances you launch into them.
This topic appears on the SAA-C03 exam through "which placement strategy" scenarios that test whether you can match a workload (low-latency HPC, highly available small fleets, or large distributed data stores like Hadoop and Cassandra) to the right group type. You should know what each strategy optimizes for, the use cases that signal each one, and the limitations such as instance counts, single-Availability-Zone constraints, and capacity behavior.
Three Strategies for Three Goals
Use a cluster placement group to pack instances close together for the lowest network latency and highest throughput. Use a spread placement group to isolate a small set of critical instances on distinct hardware. Use a partition placement group to give large distributed systems rack-level fault isolation while still scaling to many instances.
Map the workload to the strategy: tightly coupled HPC and big data with high node-to-node traffic point to cluster; a handful of critical instances that must not share hardware point to spread; large distributed stores like HDFS, HBase, Cassandra, and Kafka point to partition. Remember that cluster stays in a single Availability Zone, spread allows a maximum of seven running instances per Availability Zone per group, and partition supports up to seven partitions per Availability Zone.
Key Concepts
Cluster Placement Group
Pack Instances Close for Low Latency
A cluster placement group packs instances close together inside a single Availability Zone, ideally on the same high-bisection-bandwidth network segment. This delivers the lowest network latency and the highest packet-per-second throughput between instances, which tightly coupled workloads need. Instances in a cluster group can use Elastic Fabric Adapter (EFA), a network interface that accelerates inter-node communication for High Performance Computing (HPC). The trade-off is reduced fault isolation: because instances sit on shared, nearby hardware, a hardware failure can affect many of them at once. A cluster group cannot span Availability Zones.
Spread Placement Group
Isolate Critical Instances on Distinct Hardware
A spread placement group places each instance on distinct underlying hardware, meaning each instance sits on its own rack with its own network and power source. This minimizes the chance that a single hardware failure takes down more than one instance, which suits a small number of critical instances that must stay independent. A spread group can span multiple Availability Zones within a Region, but it is limited to a maximum of seven running instances per Availability Zone per group. The strategy optimizes for availability rather than for network performance.
Partition Placement Group
Rack-Level Isolation at Large Scale
A partition placement group divides instances into logical segments called partitions, where each partition maps to a distinct set of racks that do not share underlying hardware (power and network) with other partitions in the same group. A failure in one partition affects only that partition. This combines fault isolation with the ability to scale to many instances, which is why large distributed and replicated workloads use it. You can have up to seven partitions per Availability Zone, and a partition group can span multiple Availability Zones in a Region. EC2 exposes the partition number to the instance, so distributed applications can place data replicas in different partitions on purpose.
The Three Placement Strategies
| Dimension | Cluster | Spread | Partition |
|---|---|---|---|
| Optimizes for | Lowest latency and high throughput | Hardware fault isolation | Fault isolation at large scale |
| Hardware layout | Packed close together | Each instance on distinct hardware | Grouped into isolated partitions |
| Availability Zones | Single Availability Zone only | Can span multiple zones | Can span multiple zones |
| Scale limit | Limited by instance capacity in one zone | Seven running instances per zone per group | Seven partitions per zone |
| Typical workload | Tightly coupled HPC and big data | Small set of critical instances | Large distributed data stores |
Use Cases for Each Type
Matching Workloads to Strategies
Cluster fits tightly coupled, node-to-node workloads such as HPC simulations, scientific modeling, and big data jobs that exchange large volumes of traffic and benefit from the lowest latency. Spread fits a small number of instances that must remain isolated from one another, such as a set of critical application servers or replicated control-plane nodes where losing more than one at the same time is unacceptable. Partition fits large distributed and replicated systems such as HDFS (Hadoop Distributed File System), HBase, Cassandra, and Kafka, where you spread replicas across partitions so a single rack failure cannot take down all copies of the data.
Use Case Signals
| If the scenario describes... | Choose |
|---|---|
| Lowest possible network latency between nodes | Cluster |
| HPC or MPI workloads using EFA | Cluster |
| A few critical instances that must not share hardware | Spread |
| Reducing correlated failure for a small fleet | Spread |
| Hadoop, Cassandra, Kafka, or HBase at scale | Partition |
| Rack-aware replica placement | Partition |
Limitations
Constraints to Remember
Each strategy has boundaries the exam tests. A cluster group lives in one Availability Zone, and launching many instances at once is recommended because adding instances later can fail with an InsufficientInstanceCapacity error if the close-proximity hardware is full. A spread group allows a maximum of seven running instances per Availability Zone per group. A partition group supports up to seven partitions per Availability Zone. Across all types, you cannot merge placement groups, and you generally should keep instance types consistent in a cluster group for best performance. You can move or add an existing instance into a placement group, but the instance must be in the stopped state when you do so.
Key Limits
| Constraint | Cluster | Spread | Partition |
|---|---|---|---|
| Spans Availability Zones | No | Yes | Yes |
| Max running instances per zone | Capacity dependent | Seven per group | No fixed instance cap |
| Max partitions per zone | Not applicable | Not applicable | Seven |
| Recommended launch pattern | Launch all instances together | Add as needed | Add as needed |
| Common failure mode | InsufficientInstanceCapacity | Hitting the seven-instance limit | Hitting the seven-partition limit |
Best Practices
1. Match the strategy to the goal
├── Cluster: lowest latency and highest throughput
├── Spread: isolate a few critical instances
└── Partition: fault isolation for large distributed stores
2. Launch cluster instances all at once
└── Reduces the chance of InsufficientInstanceCapacity later
3. Keep instance types consistent inside a cluster group
└── Mixed types can reduce network performance and capacity success
4. Use EFA inside cluster groups for HPC and MPI traffic
└── Accelerates node-to-node communication
5. Place replicas in different partitions
└── Make distributed apps rack-aware so one rack loss is survivable
6. Stop an instance before moving it into a placement group
└── Instances must be stopped to join, move, or leave a groupCommon Pitfalls
Pitfall 1: Using a Cluster Group for High Availability
Mistake: Choosing a cluster placement group when the goal is to survive hardware failures.
Why it fails: Cluster packs instances onto nearby, shared hardware in one Availability Zone, so a single failure can affect many instances at once and there is no cross-zone protection.
Correct Approach: Use a spread placement group for a small set of critical instances, or a partition placement group for larger fleets that need fault isolation.
Pitfall 2: Expecting a Spread Group to Hold a Large Fleet
Mistake: Trying to launch dozens of instances into one spread placement group in a single Availability Zone.
Why it fails: A spread group allows a maximum of seven running instances per Availability Zone per group, so launches beyond that limit are rejected.
Correct Approach: Use spread for small critical fleets, and switch to a partition placement group when you need fault isolation at larger scale.
Pitfall 3: Adding Cluster Instances One at a Time
Mistake: Starting a cluster placement group small and growing it instance by instance over time.
Why it fails: Cluster placement requires close-proximity capacity; once that hardware fills, adding instances can fail with an InsufficientInstanceCapacity error.
Correct Approach: Launch all the instances you need in a single request, and keep the instance types uniform so AWS can reserve the proximity capacity up front.
Pitfall 4: Moving a Running Instance into a Group
Mistake: Trying to add a currently running instance to a placement group.
Why it fails: An instance must be in the stopped state to join, move between, or leave a placement group.
Correct Approach: Stop the instance, modify its placement group, then start it again.
Test Your Knowledge
A research team runs a tightly coupled HPC simulation across many EC2 instances that exchange large volumes of traffic and require the lowest possible network latency between nodes. Which placement strategy should the architect choose?
A company deploys a Cassandra cluster of 30 nodes and wants to ensure that a single rack or hardware failure cannot take down all replicas of any data partition. Which placement strategy fits this requirement?
An architect needs to run five critical application servers and wants each one isolated on separate underlying hardware to minimize correlated failures. Which approach satisfies this with the least configuration?
Related Services
Quick Reference
Decision Summary
Quick Decisions
| If you need... | Choose |
|---|---|
| Lowest latency and highest throughput | Cluster |
| HPC or MPI with Elastic Fabric Adapter | Cluster |
| A small set of instances on isolated hardware | Spread |
| High availability for a critical few | Spread |
| Fault isolation for a large distributed store | Partition |
| Rack-aware replica placement | Partition |
Common CLI Commands
# Create a cluster placement group
aws ec2 create-placement-group \
--group-name hpc-cluster --strategy cluster
# Create a spread placement group
aws ec2 create-placement-group \
--group-name critical-spread --strategy spread
# Create a partition placement group with 5 partitions
aws ec2 create-placement-group \
--group-name data-partition --strategy partition --partition-count 5
# Launch instances into a placement group
aws ec2 run-instances \
--image-id ami-0abcd1234efgh5678 --count 4 \
--instance-type c5n.18xlarge \
--placement "GroupName=hpc-cluster"
# Move a stopped instance into a placement group
aws ec2 modify-instance-placement \
--instance-id i-0123456789abcdef0 --group-name critical-spread
# List placement groups
aws ec2 describe-placement-groups