'AWS EC2 Placement Groups: Partition vs Spread

Is there a good comparison table for the two types of AWS EC2 Placement Groups?

  • Partition
  • Spread

I have read the AWS Documentation but I am still a bit confused.



Solution 1:[1]

After reading the AWS Documentation a bit more and googling a little bit more, I think I have some idea. Let me try to provide the answer myself below. Comments are welcome.

  • Parition Placement Group

    • Each partition within a PG has its own set of racks. Each rack has its own network and power source
    • Good for deploying large distributed and replicated workload. There are at most 7 parititions in each AZ, but the number of instances in each partition is limited only by the account limits.
    • Offer visibility into the partitions
    • Partitions can be in different AZs in the same region
    • A newer feature (compared to the Spread PG) introduced only in December 2018 (see Annoucement of the feature)
  • Spread Placement Group

    • Each instance is placed in its own distinct rack. Each rack has at most one instance
    • Good for deploying applications that have a smaller number of instances. You can have at most 7 instances per AZ in the group
    • The group can span multiple AZs in the same region.

Solution 2:[2]

Firstly, a Rack server, is a computer dedicated to be used as a server and designed to be installed in a framework called a rack. Each rack has its own network and power source.

In Cluster Placement group, all instances are placed within a rack. If the rack fails (hardware failure), all instances fails at the same time. Hence, this is not suitable for High Availability or mission critical applications. But ideal for High Performance applications, as all the instances are in very close proximity to each other.

In Spread Placement group, each instance is placed in its own distinct rack. Each rack has at most one instance. A rack failure (hardware failure) will not affect more than one instance. Hence, this is ideal for High Availability or mission critical applications. But not really suitable for High Performance applications, as the instances are spread much further apart.

In Partition Placement group, each partition represents a rack. If a rack fails (hardware failure), it may affect multiple instances on that rack, but only within that partition. This way, failure of one partition is isolated from the rest of the partitions. So, if you have replication in other partitions, then your data will be safe. This placement group strikes a balance between High Performance and High Availability. This will be good for Big data applications like HDFS, HBase, Cassandra, Kafka, etc. which needs High Performance, but must also be Fault Tolerant at the same time.

Solution 3:[3]

Spread: i) No visibility into the groups. ii) You cannot launch an instance into a specific group. iii) Seven EC2 instances per AZ per group. iv) Small number of critical workload instances

Partition: i) It offers visibility into the partition. ii) You can use partition-aware big-data apps. (Hadoop, Kafka, etc.) iii) Can launch up to hundreds of EC2 instances in a single partition per AZ. iv) Can launch an instance into specific partition, it offers more control.

Reference: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 leeyuiwah
Solution 2
Solution 3