3

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!

1 Answers1

2

EFS performance depends on how much data you have on the volume. The more you store the higher is the performance. That’s probably why with just 1.3GB it’s slow.

You can however pay for EFS provisioned IOPS that will increase the performance for an extra cost.

Alternatively you can simply store a couple of big files (e.g. 10x 50GB) to increase the volume-size related performance.

Test both approaches and see how you go.

MLu
  • 26,247