aws-samples / aws-refarch-wordpress

This reference architecture provides best practices and a set of YAML CloudFormation templates for deploying WordPress on AWS.
MIT No Attribution
1.08k stars 601 forks source link

EFS is a performance killer for a web app #48

Open GiuseppeIuculano opened 6 years ago

GiuseppeIuculano commented 6 years ago

Have you ever tried this arch in a very trafficked site? EFS is a performance killer, you really should not use it for a Wordpress site

rafasashi commented 5 years ago

Have you ever tried this arch in a very trafficked site? EFS is a performance killer, you really should not use it for a Wordpress site

I agree, I have just tried and it is simply not possible to run .php files from EFS, too slow.

Instead, I am thinking about using CodePipeline with Github webhooks to push code changes across multiple instances.

I am also planing to keep EFS to share the cache folder only.

Images and media are offloaded to S3 and of course the database is in RDS.

By the way I have tried Mysql Aurora and I moved back to Mysql because Aurora is too expensive and doesn't speed up that much the loading time of the page (at least not from a human eye).

After that I hope I can take full advantage of Elastic Load Balancing, until then it remains limited....

I will try to give feedback about this stack, in the meantime you are most welcome to tell me what you think about it.

tedsecretsource commented 5 years ago

@Derevko Do you happen to have any data to support this observation? It's not that I don't believe you, but if I am going to make this argument to my clients, for example, they are going to want to see statistics. Also, I would be very interested in learning what Performance and Throughput modes you are using.

I'm asking because we're about to embark on a project that might use this exact architecture and we would love to be able to plan for these kinds of issues should they arise.

ecout commented 5 years ago

@[tedsecretsource] Did you find out eventually? I mean it seems there wouldn't be any other option to perform a load test...which is expensive unless you're already at scale. In other way's you can run a basic blog from s3 but wordpress was designed for Internet before the cloud. Anyone here who managed wordpress in a data center at scale?

rafasashi commented 5 years ago

Hello @ecout we manage multiple blogs from AWS. We have ELB with 3 instances EC2. All the images and media are stored in S3. The script and plugins are stored in each EC2 (A,B and C) and we use EFS as a pseudo versioning system to deploy new plugins and upgrades. Only one instance (A) can interact with the plugins and from our modified plugin panel we have a button to push updated versions of the plugin to B and C but it can aso be done automatically, this depend on how you will customize the plugin system.

Basically (A) will copy the plugin to the EFS partition shared between all instances and (B) and (C) will update the plugin from the EFS partition. You can't run script from EFS and even if some people have shown that it is possible they use a lot of caching mechanism (Varnish, Memcache...) which indirectly means that they are not using EFS as a resource because a version of the script is cached in each instance at the end of the line.