My client is planning to run Laravel on multiple load-balanced EC2 instances, all sharing a single EFS for storing the Laravel source code. From my research, this setup can cause a drop in performance. However, all the information I have gathered is more than three years old, so I am unsure whether things are different now. Does this method significantly slow everything down? Is there any other overhead I should be aware of?
For additional information, my Laravel project has hundreds of files written by me and my team. Including the packages' code, we have a lot of files to read and run.
Thanks for any information you can provide. I really appreciate it.
I think it’ll be fine for reading the code, especially if you use cache. It’ll be slow to write the files to disk but that might be okay (unless perhaps the logs are written to a lot).
IIRC there are some flags you can use to adjust the cache settings when mounting the EFS drive (it’s been a while since I messed with that, however).
@fideloper Thanks for the information.
They want to implement EC2 Auto Scaling. They are planning to have an EFS storing the source code. When a new EC2 instance is added to the load-balanced group, they just attach that EFS to the new EC2 instance and get it running.
Logs will also be written to the EFS, but there aren't a lot of them, so according to you, that shouldn't be a problem.