we are working on an online Exam system which will have high traffic at the same time, the system developed using laravel and MySQL as database. our server has 40 core and 64 GB RAM memory. I installed Nginx in a docker container PHP in another container Mysql in another container, also we tested the system with the classic way, where all services working in the same server directly without docker. but the problem is the system can not handle more than 600 Users at the same time. we tried with Nginx performance tunes and nothings works, and also with php-fpm. I don't know why is that happening, we tried with all architecture that can help but nothings work, every PHP-fpm process using 27% of CPU . and when I am using
ApacheBench
in order to send requests to the server and then trying to load the home page from my browser it taking a long time to respond to the page and many times return time-out.
I am using Nginx:stable-alpine as Nginx docker image.
php:7.4-fpm-alpine
as PHP image. I did not change any of the default configs for PHP or Nginx. so what is the best configuration for PHP and Nginx which I have to apply in order to have the best performance?
htop result before send requests

htop after send request using
sudo ab -n 5000 -c 600 https://demo.qsinav.com/
