I am testing out aws auto scaling and other corresponding services.
I have 1 instance registered to target group
minimum/desired instances on auto scaling group as 1. Scale up when CPU utilisation above 50%
During load testing, due to increase in server response time, aws target group fails health check and starts draining the 1 instance that is serving behind my aws application load balancer. Afterwards auto scaling group starts removing the unhealthy instance and my web service goes down.
What should happen is that aws auto scaling group should spin off new insurance as soon as there is an increase in load on the server.
If I increase the minimum/desired server to 2 or 4, same results, on load testing, all servers receive heavy traffic, target group health check fails and it marks all of them unhealthy and aws asg starts removing them all before detecting high CPU utilisation and spawn new instances.
What should be done here?