Placement Groups control HOW EC2 instances are physically placed in AWS data centers. By default, AWS places instances wherever capacity is available. Placement Groups let you specify placement for specific performance or fault tolerance requirements.
| Type | Physical Placement | Best For | Risk |
|---|---|---|---|
| Cluster | Same rack, same AZ | HPC, low latency networking (10Gbps between instances) | If rack fails, ALL instances fail |
| Spread | Different racks, different hardware | Critical instances needing maximum isolation (up to 7 per AZ) | Limited to 7 instances per AZ |
| Partition | Different partitions (rack groups) — you choose which partition | Cassandra, Kafka, HDFS — rack-aware distributed systems | Partition failure affects multiple instances |
Use case: Financial risk calculations requiring microsecond-level inter-node communication
Benefits:
- 10 Gbps enhanced networking between instances
- Sub-millisecond latency
- Same AZ (low network hop count)
Risk:
- Single rack = single point of failure
- If rack hardware fails, ALL instances in the group can fail
Best instance types: compute-optimised (C family), enhanced networking
Use case: 3-node Zookeeper cluster for a critical coordination service
Benefits:
- Each instance is on separate hardware (different rack, power, network)
- Maximum fault isolation
- Can span multiple AZs
Limitation:
- Maximum 7 instances per AZ per group
- Not suitable for large clusters