Guidance for Optimizing Heterogeneous Auto Scaling Group Resource Utilization on AWS
Overview
How it works
These technical details feature an architecture diagram to illustrate how to effectively use this solution. The architecture diagram shows the key components and their interactions, providing an overview of the architecture's structure and functionality step-by-step.
Well-Architected Pillars
The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.
Operational Excellence
EventBridge implements Lambda functions at specified intervals so that you can automate the use of heterogeneous instances in an Auto Scaling group. CloudWatch monitors and logs events, such as interruptions to Amazon EC2 Spot Instances, which you can further configure in the Spot Instance interruption dashboard.
Security
AWS Identity and Access Management (IAM) grants Lambda only the permissions that are necessary for it to modify listener weights on the specified ELB ARN and listener ARNs. By using the principle of least privilege, you can better control access to AWS resources.
Reliability
This Guidance is an enhanced optimization solution built on a reliable architecture. It uses ELB for traffic distribution so that you will not have a single point of failure. ELB uses synchronous loose coupling to avoid directing traffic to overloaded Amazon EC2 instances, reducing the chance of application failure. As a result, you can minimize downtime errors. Additionally, this Guidance uses multiple weighted target groups backed by Auto Scaling groups. This adds an additional layer of reliability, because even if one Auto Scaling group cannot get enough Amazon EC2 instances, other Auto Scaling groups can support inbound traffic, helping you avoid application failures.
Performance Efficiency
This Guidance helps you avoid hot spots in heterogenous clusters by balancing the use of larger and smaller Amazon EC2 instances. Additionally, it is an AWS best practice to use a mix of instance sizes and types in a single Auto Scaling group and to use Spot Instances as a diversification tactic. However, this practice can result in unbalanced utilization, so this Guidance uses multiple Auto Scaling groups with similar capability and adjusts the weights at ELB listener forwarders to maximize resource utilization.
Cost Optimization
Previously, to avoid timeouts and hot spots, you might have needed to artificially keep utilization below 40 percent. Now, by using this Guidance, you can increase resource utilization by distributing traffic with dynamic weighted routing from ELB. Depending on your application and requirements, you might even be able to achieve utilization of 60 to 70 percent, leading to significant Amazon EC2 cost savings. Additionally, Spot Instances provide a discount of up to 90 percent compared to Amazon EC2 On-Demand Pricing. Finally, Auto Scaling groups scale up and down depending on traffic and usage patterns to optimize resource utilization, and the use of multiple Auto Scaling groups in a dynamic weighted routing solution provides another layer of resource optimization, ultimately resulting in cost savings.
Sustainability
This Guidance uses Auto Scaling groups that automatically scale in or terminate idle resources. Additionally, the use of multiple homogeneous Auto Scaling groups with similarly capable Amazon EC2 instances helps eliminate hot spots, increase utilization, and reduce wastage, power, and cooling. Spot Instance utilization in an Auto Scaling group also directly contributes to sustainability, because these instances consume the same energy resources as On-Demand Instances, but they would be unused otherwise.
Implementation resources
Disclaimer
Did you find what you were looking for today?
Let us know so we can improve the quality of the content on our pages