Hi Christos
I think there are four separate answers to your question
Ensure you are not using the filesystem for sessions. Since you're on AWS, you can use ElastiCache (either Memcached or, if you're using Moodle 3.2 or newer, Redis)
EFS performance is proportional to the size of the filesystem, i.e. the more you store, the faster it goes. One trick is to make a monster file of zeroes, and the filesystem will go faster. There's also the usual myriad "burst credits" and "provisioned IOPS" options for you to work through. Have a look here: https://docs.aws.amazon.com/efs/latest/ug/performance.html
Caching your moodledata files locally on the web servers will be fine, if you restrict your caching strategy to the
filedir
directory. Each file in Moodle is named on the filesystem according to its SHA1 digest. This is unlikely to collide with a different file. Indeed, if you upload exactly the same file in a different location, the new location is only a reference to the original file (a bit like a symbolic link, but in the Moodle database). More info here: https://docs.moodle.org/dev/File_API_internalsYou probably don't want to store the Moodle application on the EFS. Since that changes rarely, you should look at creating an AMI that has your version of Moodle and your preferred plug-ins already installed, and using that AMI in an auto-scaling group.
In short, you'll be fine to cache moodledata/filedir
locally, but have a look at ways to make your EFS go faster.