Implementing Cloud Design Patterns for AWS(Second Edition)
上QQ阅读APP看书,第一时间看更新

Placement groups

To further distribute your load across physical hardware, you can create a placement groupThe following resource will cause your instance to be spread across underlying hardware:

resource "aws_placement_group" "web" {
name = "book-pg"
strategy = "spread"
}

Add the following to your instance resources to spread them across underlying hardware:

placement_group = "book-pg"
You could also use the cluster strategy to a create a low-latency instance group in a single AZ.