Elastic Load Balancing and Autoscaling Flashcards
Auto Scaling
automatically launches and terminates instances within a Region
maintains availability and horizontally scales (scale out) capacity
provides elasticity and scalability
works with EC2, EKS, ECS
What services does Auto Scaling integrate with and how?
CloudWatch for monitoring and scaling
ELB for distributed connections
EC2 Spot Instances for cost optimization
VPC for deploying instances across AZs
Use cases for auto scaling
automatic scaling
maintain availability
What triggers autoscaling
scaling policies based on demand/performance e.g. (EC2 status checks, CloudWatch metrics) or schedule
What is a launch template?
specified EC2 instance configuration for autoscaling:
AMI
Instance type
EBS volumes
Security Group
key pair
IAM instance profile
User data
Shutdown behavior
termination protection
placement group name
capacity reservation
tenancy
purchasing option (e.g. spot)
Launch Config
specified EC2 instance configuration for autoscaling:
AMI
Instance type
EBS volumes
Security Group
key pair
IAM instance profile
User data
purchasing option (e.g. spot)
replaced by launch templates and have fewer features
What do you configure for auto scaling
Launch template or config
Purchase options (on demand or spot)
Configure VPC and Subnets
Attach load balancer
configure health checks for EC2 and ELB
Group size and scaling policies
What types of health checks are possible with autoscaling
EC2 - EC2 health checks
ELB - ELB health checks in addition to EC2 health checks
Health Check Grace Period
how long to wait before checking the health status of the instance
autoscaling does not act on health checks until the grace period expires
Types of Auto Scaling
Manual - makes changes to ASG size manually
Dynamic - automatically scale based on demand
Predictive - uses ML to predict
Scheduled - scales based on schedule
What do scaling policies do?
define how to respond to changes in demand
Autoscaling Group
defines collections of EC2 instances that are scaled and managed together
What types of monitoring are available for ASG?
Group
Basic (Instance)
Detailed (Instance)
How often does ASG produce metrics? Is there a charge? How are they configured?
1 minute granularity
No Charge
Must be enabled
How often does an EC2 instance produce metrics? Is there a charge?
5 minute granularity
No Charge
How often does an EC2 instance produce detailed metrics? Is there a charge?
1 minute granularity
Yes, charges apply