Autoscaling groups in AWS
- ASG is a fleet of ec2 instances as a single unit where we can set minimum/maximum number of instances
- Parameters
- minimum
- maximum
- desired
- In ASG to specify the configuration of the ec2 instances which we want to scale we create a launch template (LT) where we configure
- AMI
- instance type
- vpc with subnets
- Scaling:
- Fixed
- Autoscaling
- Target Tracking
- Step/Scheduled
Lets configure ASG with fixed scaling
- create a launch template.
- note: for guided creation watch classroom video.
- Create an auto scaling group with min max and desired set to a fixed value with no scaling policies
AWS Autoscaling options
- Dynamic Scaling options:
- Target Tracking
- Simple Scaling
- Step Scaling
- Predictive Scaling
- Scheduled scaling
Details
- Target Tracking: In this we choose metric and set the target value(like keep average cpu utilization at 70% ). ASG continuously measures that metric and then scales in or out accordingly
- Predictive Scaling policy: This is where a ml model of aws will start learning usage based on atleast 48 hours of data and does predective
- Scheduled Action: Is where we can configure the schedules to run the number of instance based on schedule.
