Are your requests doing a lot of activity on your database?
Have you got all your indexes in place?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Attempting to change the server config to support a larger number of concurrent users in the laravel app. Despite making a variety of changes found that the response time does not improve. Note: jMeter is used to load test the app's APIs.
2 Users sending requests for 20 seconds. API Response time: 200ms
20 Users sending requests for 20 seconds. API Response time: 6.5s
CentOS, 4GB Ram, 2 CPU cores (t3.medium)
Note: APIs being load tested are not using DB. This is mainly to keep the database out of the equation - suggestions for optimal DB settings are welcome. The API primarily is linked with a controller that returns a hardcoded array.
Had increased the server config to xlarge, 2xlarge, and 4xlarge.. Despite that, no significant improvements had been noticed.
Strangely the error rates shot up.
The following optimizations/changes have been done:
What changes should be made to the server config to serve the requests faster? Would choosing nginx and making the necessary optimizations help serve the requests faster?
Please or to participate in this conversation.