I'm in a company where we have an elastic beanstalk configuration and it works fine with our CICD. The only issue is that earlier today i ran a stress test (basically just disabled AWS shield and went hammer on the DDOS). Regardless of what we did we couldn't get our medium sized server to crash (this was with a i9 cpu - so just a gaming pc) where we ran a multithreaded python script just sending GET requests. We then downgraded to t2.small because regardless of what we put the servers through the target response time went to almost 8 seconds before the CPU utilization got over 50% every time. The autoscaling works as it's supposed to but even after the upgrade (2 servers per trigger) the response time was still around 4-6 seconds. The trigger we're using right now is that it should create 2 new instances if the response time exeeds 1.5 seconds and then cool down for 360 seconds if it gets below 1 second.
The system is running PHP with apache2.4. There hasn't really been made the biggest configs other than virtualhost configs.
It can't be the db since its read and write both are below 0.1 seconds. I can't seem to figure out how to get the response time down?
Edit for further clarification of the setup: We have an entry at route 53 that points to our EBS where we have an nginx proxy to handle the requests to the servers. The servers that are running are t2.small. each server has a docker container setup and inside that we have an apache with php. We haven't setup any of the autoscaling on our own but used elastic beanstalks default options for the group.