Auto Scaling
Owner | |
---|---|
Verification | |
Tags | |
Last edited time |
Scaling Polices
- Target tracking scaling - based on metric (CPU load , RequestCountPerTarget, Average Network)
- Simple/Step scaling - triggered by CW alarm
- Scheduled Actions - based on known usage (Friday night )
- Predictive scaling - forecast
Lifecycle hooks - preform actions before EC2 is in or out or service
Scaling Processes
Launch - add new
Terminate - remove
Health Checks - check EC2
Replace Unhealthy - terminate and recreate unhealthy instances
AZRebalance - balancer the number of instances across AZ
ScheduledActions - run actions on EC2 based on time
AddToLoadBalancer - adds EC2 to the target group
Instance Refresh - run refresh on instance (update AMI)
Health Checks
- EC2 status check
- ELB health check (HTTP based)
how to update an application in an ASG
- create a new launch template version
- create a new target group and split the traffic on the ALB
- create a new ALB and new ASG - use route 53 with CNAME with weighted routing