ASG Flashcards
This deck aims to help retain concepts related to the ASG service.
What configuration template does an Auto Scaling Group use to launch EC2 instances?
Launch Configuration, defines parameters such as the AMI, instance type, storage, key pair, networking, security groups, user data, and instance IAM role, it is not editable and does not support versioning
Which configuration template offers more features than a Launch Configuration?
A Launch Template provides similar functionality to a Launch Configuration but with additional features such as placement groups, capacity reservations, and elastic graphics, it can be used with both Auto Scaling Groups and individual EC2 instances and supports versioning
What are the primary features of an ASG?
- Provides automatic scaling and self-healing for EC2 instances
- Utilizes Launch Templates or Launch Configurations
- Configurable with min, max, and desired, capacity sizes
- Maintains the desired number of running instances by provisioning or terminating them as needed
What AWS service manages a collection of EC2 instances as a logical group for automatic scaling and management, and also provides features like health check replacements and scaling policies?
Auto Scaling Group (ASG)
What types of scaling policies does an ASG support?
- Manual Scaling
- Scheduled Scaling
- Dynamic Scaling (Simple Scaling, Step Scaling, Target Tracking Scaling)
What architectural components automate the scaling process in an ASG by adjusting the desired capacity based on specific metrics like CPU utilization?
Scaling Policies (not required), an ASG can be configured with static values for minimum, maximum, and desired capacity without scaling policies
Which ASG Scaling Policy allows for manual adjustments to the desired capacity?
Manual Scaling, which is useful for testing or urgent adjustments
Which ASG Scaling Policy adjusts the desired capacity based on a predefined schedule?
Scheduled Scaling
Which ASG Dynamic Scaling Policy adjusts capacity based on a single scaling adjustment, with a cooldown period between actions?
Simple Scaling - adds or removes a static number of instances based on alarm states
For example:
If ASGAverageCPUUtilization > 50%, add 2 instances
If ASGAverageCPUUtilization < 50%, remove 2 instances
Which ASG Dynamic Scaling Policy adjusts capacity based on a series of scaling adjustments known as step adjustments, varying with the size of the alarm breach?
Step Scaling - allows for detailed rules and quicker responses to more extreme changes, defines upper and lower bounds and reacts more flexibly to changing load patterns
For example:
If ASGAverageCPUUtilization > 50%:
- 50%-59%: Do nothing
- 60%-69%: Add 1 instance
- 70%-79%: Add 2 instances
If ASGAverageCPUUtilization < 50%:
- 40%-49%: Do nothing
- 30%-39%: Remove 1 instance
- 20%-29%: Remove 2 instances
Which ASG Dynamic Scaling Policy adjusts capacity based on a CloudWatch metric and a target value?
Target Tracking Scaling
Sets an ideal metric (e.g., CPU utilization = 60%), ASG automatically adjusts the capacity to maintain the metric at the target value
In ASG Scaling Policies, which attribute (value in seconds) determines the waiting period between consecutive scaling actions?
Cooldown Period
Can ASG Scaling Policies be based on the number of visible messages in an SQS queue?
Yes, using the ApproximateNumberOfMessagesVisible metric, is a common approach in architectures for worker pools
How does ASG perform health checks on EC2 instances?
By default, ASG uses status checks to monitor EC2 instances, if an instance fails a status check, ASG terminates the instance and provisions a new one, providing self-healing capabilities
How can application awareness be provided to an ASG?
By integrating the ASG with an ELB and configuring ALB health checks instead of default EC2 status checks