AWS EC2 Placement Groups
Placement Groups is a feature in Amazon EC2 that helps us control how our instances are physically distributed across the AWS infrastructure.
Strategy
Cluster
Cluster placement groups place instances close together within a single AZ on the same physical hardware or in a low-latency network. It is used for tightly coupled node-to-node communication that is required by high-performance computing applications.
Pros: low latency, and high network throughput.
Cons: do not be resilient to failure, if the AZ fails, all the instances fail at the same time.
Use case
Ideal for high-performance computing applications (HPC), or for applications that benefit from low-latency, high network throughput, or both.
Spread
A spread placement group is a group of instances placed on distinct hardware. A rack-level spread placement group can span multiple AZs in the same Region (a rack is a physical hardware unit with its own network and power supply).
Pros: can span multiple AZs. Therefore, the instances group is resilient to failure and reduces the risk of simultaneous failure.
Cons: limited to 7 instances per AZ per placement group
领英推荐
Use case
Applications that have a small number of critical instances should be kept separate from each other or maximize availability.
Partition
Spread instances across many different partitions (different sets of racks). AWS guarantees that the instances from different partitions will be isolated from instances in other partitions within an AZ.
A partition placement group can have partitions in multiple AZs in the same Region. A group can have up to 7 partitions per AZ.
Pros: Resilient to failure and reduces the risk of simultaneous failure. A partition failure can affect instances in it but won't affect instances in other partitions.
Cons: limited to 7 instances per AZ per placement group, network performance between partitions on different AZs is not optimized.
Use case
Big data, large-scale distributed system: HDFS, HBase, Hadoop, Cassandra...
Create and use placement group