the main problem is:
Infrastructure:
Autoscaling (min 1 - max 3)
RDS
ELB
elasticache (redis)
elasticsearch
I want to share a volume (EFS / S3) with the code of my application; The size of it is about 1.3 Gb.
With EFS:
The first attempt I tried to mount with the permissions and uid, gid, umask, etc. and It works, but the EFS is really slow even with the performance mode and with the dedicated 10 Mb of data transfer.
Apache tries to read the content on that path (EFS) and the response is slow as hell.
mount -t nfs4 efs-amazonaws.com:/ /var/www/filesystem/custom/
With S3
It works faster than the EFS but the problem is that when apache reads the content on the bucket (mounted equal as the EFS), it fails to connect to the resources inside the bucket, example Mysql functions.
s3fs bucket-name /var/www/filesystem/custom/ -o allow_other,uid=33,gid=33,mp_umask=002
The other alternative that I have is:
1- Mount the S3 or EFS in other location of the server.
2- With Lsyncd replicate the changes on the s3 to the real path of the server app.
What I need are alternatives of what can I do to share a volume in my autoscaling group . !!
Thanks!