I have a MYSQL database hosted on RDS with 16GB RAM. I'm using an r4.large with 20GB General purpose SSD storage. We are using a microservice architecture and has 6 backend containers. So the request will hit the RDS from that 6 backend servers.
The operation on our application has more read and write operations. We are trying a load test of our application and using 10 to 20 users for the load test. But while testing and when we reached nearly 20 users for load test, we noted that the response time is really high. While checking on RDS metrics, we figured out that the freeable memory came down from 15GB to nearly 1GB and not coming up also.
The main issue we faced was when we again test the load using 10 users, the response time taken was really high. It was not comparable with the initial test results of 10 users.
I'm not sure it is the freeable memory causing the issue, or else any other factor. How can I figure out the issue and resolve it? Any help would be appreciated.