1

i built an highly available and fault tolerant Wordpress site on AWS Cloud,

i using ubuntu 20.04 and apache2.4,

/var/www/html is mounted on EFS filesystem configured whit provisioned troughtput at 15mbps (108$ month),

i have an autoscaling group (accessible trought ALB) launching my ami on t3.medium istances,

the scaling working pretty fine but the site is slow even after caching on the broswer,

i know that the problem is the EFS couse if i use the ebs the site speed is ok,

i tryed to configure all the site on cloudfront following this configuration here but it seems to make things wrost,

anyway the .php files need to be executed on the local filesystem,

im using opcache at 900 revalidate freq 512 memory and 20000 max for the files,

anyway if use ebs the site is work a lot better,

that is a possible solution but i dont know if could work i need some help:

the customer load/change php files (rarely) like wp-settings trought sftp on a master istance,

this master istance is not in the autoscaling group,

so for the master istance i want mount 2 efs volumes,

Master EC2:

EFS1 mounted /var/www/html

EFS2 mounted /var/www/html/wp-content

Istances in the autoscaling groups:

EFS2 mounted/var/www/html/wp-content

EFS1 mounted /mount/efs1

then i need to synch the folder "/mount/efs1" whit the folder"/var/www/html/" excluding subfolder "wp-content" every minute and set a delay of 70-80 for the scaling of a new istance in the autoscaling,

i dont know how to synch in the right manner the two folders and if i have to synch it two ways or if i have to set a master and a slave,

im wondering if use lsyncd, rsync or unison,

any help or alternative solution will be appreciated

thanks in advance

3
  • 2
    You could consider putting Wordpress on EBS for each instance, then mapping the wp-content/uploads folder to EFS. Alternately keep everything on EBS and use a plugin to push uploads to S3 and users download them directly.
    – Tim
    Dec 14, 2020 at 20:39
  • i want put wordpress on ebs..., but for the changes at the code i want so synch this changes from another folder, im asking a correct way to synch 2 directories in the same linux system
    – EricDrvn
    Dec 14, 2020 at 21:25
  • 1
    Read my answer again and make sure you fully understand it before you discard it. Syncing is probably not the best approach.
    – Tim
    Dec 14, 2020 at 21:48

0

You must log in to answer this question.

Browse other questions tagged .