📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials AWS Solutions Architect EC2 Placement Groups

EC2 Placement Groups

4 min read Quiz at the end
Choose the right EC2 Placement Group (Cluster, Spread, Partition) based on latency, fault isolation, and scale requirements.

EC2 Placement Groups — Controlling Physical Placement

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.

Teacher Note: Without Placement Groups, AWS distributes instances randomly. For some workloads this is fine. But if you need maximum network speed between instances (HPC cluster) or maximum fault isolation (critical database nodes), you need to tell AWS exactly where to put each instance.

Three Types of Placement Groups

TypePhysical PlacementBest ForRisk
ClusterSame rack, same AZHPC, low latency networking (10Gbps between instances)If rack fails, ALL instances fail
SpreadDifferent racks, different hardwareCritical instances needing maximum isolation (up to 7 per AZ)Limited to 7 instances per AZ
PartitionDifferent partitions (rack groups) — you choose which partitionCassandra, Kafka, HDFS — rack-aware distributed systemsPartition failure affects multiple instances

Cluster Placement Group — Ultra-Low Latency

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

Spread Placement Group — Maximum Isolation

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
Exam Tip: Spread Placement Groups are for critical, small sets of instances where you cannot have two fail simultaneously. Cluster Groups are for tightly-coupled HPC workloads needing maximum network throughput. Partition Groups are for large distributed systems like HDFS and Cassandra that are designed to tolerate hardware failures.
Topic Quiz · 1 questions

Test your understanding before moving on

1. A web application runs on 10 EC2 instances behind an ALB. The app allows users to upload profile photos that need to be accessible to ALL 10 instances. Which storage service is BEST?
💡 EFS provides shared NFS storage accessible by all 10 instances simultaneously. S3 would also work but requires application changes to use the S3 API instead of filesystem calls.