I'm trying to create an autoscaling group for my web server in AWS.
I do the following:
1.- Create a load balancer. This load balancer checks the first instance of the autoscaling group.
Health Check Tab
2.- Create an autoscaling group with an AMI. The policies are:
- INCREASE: If Maximum CPU is >= 70% for 1 min it start 1 instance based on the AMI. It waits 60 sec before allowing another scaling activity.
- DECREASE: If Maximum CPU is <= 25% for 5 min it removes the newest instance. It waits 0 sec before allowing another scaling activity.
In the DETAILS TAB of the autoscaling group I have the folling: - Desired: 1
Health Check Type: EC2
Health Check Grace Period: 60
Termination Policies: NewestInstance
Default Cooldown 60
Those are the configurations.
Apparently it works well. When we charge the instance using JMeter, AWS starts a new instance using INCREASE policy. The problems is, that seems that the new instance isn't being used. Because, when I check the monitoring graphs of AWS, the CPU stays at 0 all time. So I think that the new instances that AWS launch aren't being used. I think this is because I have a bad configuration of the load balancer, but I really don't know. What can I do?