I am running an application in the EKS cluster and I have nginx pods and applications pods (php5.6-fpm, laravel framework). Application files are on EFS, which is mounted to the EKS cluster and to the pods. I was playing with different configurations of EFS, even provisioned 50mb IOPS, but sometimes I see performance degradation. Sometimes it takes 5 seconds to load the page and sometimes 1 second.
So a couple of questions if anyone has experience. Do you think that keeping files on EFS is a good idea? Is there any way to improve overall performance in my current setup?
Can you recommend any other solution than EFS? I need to run multiply nginx and application pods and ideally share the codebase, not to copy the the same files in each pod.
CodePudding user response:
Adding a front-end (Nginx) cache layer to the deployment configuration would be a good mitigation for a slow application.
The performance bottleneck is most likely caused by the specific PHP application, not the deployment configuration itself. Try to identify what's happening when the page loads regarding CPU processing, database/network calls, etc. Create a custom PHP page to benchmark performance that is independent of the application.
CodePudding user response:
Running in conjunction with your PHP performance scripts, you can measure the EFS throughput to see if there's any unexpected fluctuation in relative to the load time; and adjust to different performance modes where applicable. A good tips is the adjustment to read_ahead_kb size on the host.