Placement Groups

Get a detailed knowledge of different types of EC2 placement groups offered by AWS.

When several EC2 instances are launched, EC2 offers that instances are distributed physically such that it can reduce the number of system crashes, thus offering high availability. However, this can be troublesome when instances require low-latency communication. Imagine a group of instances that require constant low-latency and high throughput communication to offer services to the users, and each instance is deployed on a different physical structure in an AZ. To cater to such issues, Amazon EC2 also offers placement groups.

In this lesson, we’ll learn about placement groups and their different types.

A placement group allows control of the deployment of interdependent instances in a certain way across the underlying infrastructure. Placement groups are purposely designed to meet our workload requirements.

Let’s take a deeper look into different placement strategies and their benefits.

Types of placement groups

EC2 offers different placement groups to cater to various application needs related to performance, availability, and fault tolerance. Each placement group offers flexibility to arrange instances as per the needs. Let’s take a look at them in detail. 

Cluster placement group

The cluster placement group is a logical grouping of interrelated instances to achieve the best throughput and low latency rate possible within an Availability Zone. Instances in the cluster placement group may belong to a single VPC or between peered VPCs in the same region. 

Press + to interact
Cluster placement group
Cluster placement group

The cluster placement group is recommended for applications that require high-speed throughput of up to 25 Gbps for intercommunication of instances and 5 Gbps of network speed to internet or AWS Direct Connect. Complex computational problems, live streaming, cosmology models, and network-bound applications that require HPC instance types are optimal for this arrangement.

It is important to note that not all the instance types thrive in such placement; for example, instance families like t2, Mac1, and M7i-flex are not compatible with cluster placement arrangements. Similarly, the maximum throughput between two instances is limited by the slower instances of the two. We can launch different types of instances in the cluster placement group. However, it is recommended to use network-enhanced instances as they offer up to 10 Gbps of single stream traffic flow.

Partition placement group

The cluster placement group is designed to launch interconnected instances in close physical proximity to each other on the same infrastructure. The interconnected instances may fail due to correlated hardware failure, thus resulting in application failure. Partition placement group helps us further logically divide the placement group into partitionsPartition is a logical segmentation of EC2 instances in a placement group., and each partition has its own rackRack is metaphorically used to describe the underlying infrastructure.. Each rack has its network and power source, so no two partitions suffer from correlated hardware issues. Partition placement group allows to place partitions in different Availability Zones under the same region. 

Press + to interact
Partition placement group
Partition placement group

Partition placement groups are used for large distributed computing, such as Big data stores that require distributed and repeated workloads. The partition placement group allows us to see the instances in each partition, enabling Hadoop or Cassandra topology to configure properly.

Partition placement group allows us to use up to seven partitions per AZ. EC2 tries to evenly distribute the instances across all the partitions; however, it does not guarantee an even distribution. A partition placement with dedicated instancesDedicated instances are the instances that run on a dedicated physical infrastructure for a specific account. can have up to 2 partitions maximum. Similarly, Capacity ReservationsCapacity Reservations enables us to reserve compute capacity of EC2 instances in a specific AZ for a certain time. do not reserve capacity in the case of partition placement groups.

Spread placement group

Partition placement groups still have interconnected instances on the same rack, sharing a power source. That means failure of power in the rack would cause all the instances in that rack to fail. Businesses with an application with a small number of critical instances would like to avoid a placement group with the risk of simultaneous failure. Spread placement group is the placement of instances such that each instance has its rack. The Spread placement group allows each instance on a different rack, therefore suitable for different instance types or launching times. 

Press + to interact
Spread placement group
Spread placement group

The maximum number of running instances in a spread placement group per Availability Zone can not exceed seven; however, multiple AZs can be used in a region to launch instances. Similar to the partition placement group, Capacity Reservations do not reserve capacity in the case of the spread placement group. Unlike the partition placement group, the spread placement group does not support dedicated instances.

Get hands-on with 1300+ tech skills courses.