Posted on

EC2 Placement Groups

When creating EC2 instances it may be preferrable to dicate where you would like your EC2 instances to be placed in terms of Availability Zones. This strategy can be defined via what is known as Placement Groups

When creating a Placement Group you can choose one of the following strategies:

  • Spread – Indicates that the instances will be spread across different hardware across different Availability Zones (There is a limit of seven instances per Availability Zone) and this is a good use case for critical applications. Use case is where any EC2 instance failure does not impact another EC2 instance.
  • Cluster – Places the instances into a single rack in the same Availability Zone which will result in lower latency but with higher risk as if the Availability Zone or rack goes down then so will the entire set of EC2 instances.
  • Partition – Similar to the Spread Placement Group but the instances are spread across many different partitions. Instances are spread across partitions in multiple Availability Zones. Each partition represents a rack in AWS and therefore your instances are distributed across many hardware racks in AWS and therefore are safe from a rack failure from one another. There is a limit of seven partitions per Availability Zone and you are able to have hundreds of EC2 instances. Instances in a partition do not share racks with instances in any other partition meaning that each partition is isolated from failure.

Use case for partition is where an application is partition aware such as Big Data applications such as Cassandra, HDFS, Kafka etc.