Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

VTKien0310's avatar

Running Laravel from AWS EFS downside

Hi,

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.

0 likes
4 replies
fideloper's avatar

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).

Is EFS used because it’s faster to deploy?

1 like
VTKien0310's avatar

@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.

fideloper's avatar
fideloper
Best Answer
Level 11

@VTKien0310 that does simplify deployment a bit for sure. Also it looks like my phone autocorrected “opcache” to “cache”, so 2 things to checkout are:

  1. enabling php opcache
  2. search for cache settings for NFS when mounting the EFS drive (efs = elastic file store, which is an implementation of NFS - network file storage)
1 like

Please or to participate in this conversation.