You are almost certainly running up against some kind of imposed limit from RDS. They created RDS Proxy specifically to deal with situations like this.
Laravel Performance
I have a tournament app that is anticipating high traffic this weekend, as the tournament schedule will be announced, potentially bringing in 100,000 users within minutes.
The app is hosted on AWS. I have set up a load balancer with three instances (8 GB RAM, 2 vCPUs, 160 GB SSD). The RDS MySQL database is a single t3.medium instance with 2 vCPUs and 4 GB RAM. All queries are utilizing Laravel Cache; essentially, I cache the results for 30 seconds.
The problem arises when I am testing using:
# sudo ab -n 50000 -c 1000 -t 10 https://my.domain.com
The site basically becomes unresponsive. It appears the issue lies with the database, as I observe more than 300 open connections.
I am seeking comments or suggestions on performance improvements or managing the open database connections. Am I being too aggressive with this testing?
# sudo ab -n 50000 -c 1000 -t 10 https://my.domain.com
Please or to participate in this conversation.