Choosing an EC2 Placement Group Strategy
This lesson explains how placement groups control where EC2 places instances on hardware, trading network performance against resilience to hardware failure.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish cluster, spread and partition placement groups.
- Explain how capacity is obtained for cluster placement groups.
- Choose a strategy from the requirement.
Placement strategies
A placement group influences where EC2 places instances on the underlying hardware, trading performance against the risk of correlated failure. A cluster placement group puts instances close together in one Availability Zone, on a network segment with low latency and high bandwidth between them. It gives the best node-to-node performance for tightly coupled HPC jobs, but a problem in that zone or rack can affect every instance.
A spread placement group puts each instance on distinct hardware, with its own power and network, so no two fail together. It is limited to seven running instances per Availability Zone per group, so it suits a small number of critical instances, such as the nodes of a primary and standby pair. A partition placement group divides instances into partitions on separate racks, up to seven per Availability Zone, with hundreds of instances in total, and tells each instance which partition it is in. Distributed systems such as HDFS, HBase, Cassandra and Kafka use this to keep replicas in different partitions. The following table summarises the strategies.
| Type | Placement | Limits | Use for |
|---|---|---|---|
| Cluster | Close together in one AZ, on a low-latency, high-bandwidth network segment | No AZ spread: performance over availability | Tightly coupled HPC, low-latency node-to-node traffic |
| Spread | Each instance on distinct hardware with its own power and network | Max 7 running instances per AZ per group | A few critical instances that must not fail together |
| Partition | Groups of instances on separate racks, with partition information exposed to the application | Up to 7 partitions per AZ, hundreds of instances | HDFS, HBase, Cassandra, Kafka |
The following diagram shows how each strategy places instances on hardware.

Cluster, spread or partition?
Using cluster placement groups
A cluster placement group packs instances close together in one Availability Zone for the lowest latency and highest throughput between them, and getting capacity for it needs care. All instances should be launched in a single request with the same instance type, so EC2 can find capacity for all of them together; adding instances later is more likely to fail.
If a launch fails with an insufficient capacity error, stopping and starting all the instances in the group can move them to hardware with room, or a Capacity Reservation can secure the capacity in advance. For the lowest latency, cluster placement groups are combined with enhanced networking and the Elastic Fabric Adapter.
Insufficient capacity
Choosing a strategy
The appropriate placement strategy is determined by the requirement. The following table identifies the strategy suited to each.
| Requirement | Strategy |
|---|---|
| Lowest latency between nodes | Cluster |
| Protect a small number of critical instances from simultaneous failure | Spread |
| Large distributed system that is aware of racks | Partition |
Three placement strategies
Each placement strategy suits a different workload. The following table identifies the appropriate placement group for three workloads and the reason in each case.
| Workload | Placement group | Why |
|---|---|---|
| Tightly coupled HPC simulation needing the lowest latency between nodes | Cluster | Same rack area in one AZ |
| Three critical instances that must not fail together | Spread | Each on distinct hardware |
| A 60-node Kafka or HDFS cluster that is aware of failure domains | Partition | Groups of instances on separate racks |
A cluster placement group trades availability for performance, because everything is in one AZ. For an application with a slow start-up whose in-memory state should survive stopping, EC2 hibernation saves the memory contents to the encrypted EBS root volume.
How many running instances can a spread placement group have in each Availability Zone?
Show answer
Seven, each on distinct hardware, so a single hardware failure affects at most one of them.
Exam Tips
Remember for the exam
- For the lowest latency between HPC nodes, use a cluster placement group.
- To protect a few critical instances from simultaneous hardware failure, use a spread placement group.
- For rack awareness in Kafka or Cassandra, use a partition placement group.
- A cluster placement group lives in one Availability Zone: high performance, low resilience.
- A spread placement group holds at most seven running instances per Availability Zone.