Autoscaling Groups (ASG)
Create Autoscaling groups to scale EC2 instances to your workload
Last updated
Was this helpful?
Create Autoscaling groups to scale EC2 instances to your workload
Last updated
Was this helpful?
Configure Autoscaling Groups (ASG) to ensure the application load is scaled based on the number of EC2 instances configured. Autoscaling detects unhealthy instances and launches new EC2 instances. ASG is also cost-effective as EC2 Instances are dynamically created per the application requirement within minimum and maximum count limits.
The Use for Cluster Autoscaling option will not be available until you enable the Cluster Autoscaler option in your Infrastructure.
In the DuploCloud Portal, navigate to Cloud Services -> Hosts.
Select the ASG tab, and click Add. The Add ASG displays.
In the Friendly Name field, enter the name of the ASG.
Select Availability Zone and Instance Type.
In the Instance Count field, enter the desired capacity for the Autoscaling group.
In the Minimum Instances field, enter the minimum number of instances. The Autoscaling group ensures that the total number of instances is always greater than or equal to the minimum number of instances.
In the Maximum Instances field, enter the maximum number of instances. The Autoscaling group ensures that the total number of instances is always less than or equal to the maximum number of instances.
Select Use for Cluster Autoscaling.
Select Advanced Options. The advanced options display.
Optionally, complete the following fields.
Specify an Image ID.
Agent Platform: Select Linux Docker/Native to run a Docker service or select EKS Linux to run services using EKS. Fill in additional fields as needed for your ASG.
Disk Size: Defines the storage capacity (in GiB) of the instance's root or attached EBS volumes.
Key Pair Type: Specifies the SSH key pair used for instance access, supporting none, existing, or new key pairs.
Enable Block EBS Optimization: Boosts the I/O performance of attached EBS volumes for high-throughput workloads.
Enable Hibernation: Preserves the instance's in-memory state to allow faster recovery from a hibernated state.
Metadata Service: Configures the AWS Instance Metadata Service, with IMDSv2 recommended for enhanced security.
Enable Spot Instances, and enter a Maximum Spot Price.
Enable Scale from zero (EKS only).
Select Enabled Metrics. This allows you to select which CloudWatch metrics will be collected and monitored for the ASG, providing greater control over performance and scaling insights. Available options include:
GroupMinSize: Tracks the minimum size of the Auto Scaling Group.
GroupMaxSize: Tracks the maximum size of the Auto Scaling Group.
GroupDesiredCapacity: Monitors the desired number of instances in the Auto Scaling Group.
GroupInServiceInstances: Tracks the number of instances currently running and in service.
GroupInServiceCapacity: Monitors the total capacity of instances currently in service.
GroupPendingInstances: Tracks the number of instances that are in the process of launching.
Enter Base64 Data, Volumes, or Tags.
Click Add. Your ASG is added and displayed in the ASG tab.
In the Friendly Name field, enter the name of the ASG.
Select Availability Zone and Instance Type.
In the Instance Count field, enter the desired capacity for the Autoscaling group.
In the Minimum Instances field, enter the minimum number of instances. The Autoscaling group ensures that the total number of instances is always greater than or equal to the minimum number of instances.
In the Maximum Instances field, enter the maximum number of instances. The Autoscaling group ensures that the total number of instances is always less than or equal to the maximum number of instances.
Optionally, select Use for Cluster Autoscaling.
Optionally select Advanced Options, and complete additional fields as needed.
Click Add. Your ASG is added and displayed in the ASG tab.
To view the hosts in an Autoscaling group, follow these steps:
In the DuploCloud Portal, navigate to Cloud Services -> Hosts.
Select the ASG tab.
In the NAME column, select the ASG for which you want to view Hosts.
Select the Hosts tab. A list of individual Hosts displays.
Refer to AWS Documentation for detailed steps on creating Scaling policies for the Autoscaling Group.