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 609 forks source link

Site Latency #24

Closed michael-newman closed 6 years ago

michael-newman commented 6 years ago

Happy New Year Darryl,

Background reference issue #7.

I ran v2.01 of the template without any issues, then imported/migrated an existing Wordpress site (mysite.com) into this new CloudFormation template site (newsite.mysite.com); however, I now have significant latency issues on newsite.mysite.com that I do not have on my original mysite.com (noting, mysite.com is a single t2.medium instance site).

The latency immediately causes instances to fail the Health Check, starting a cycle of termination & launching of instances--changing "HealthCheckType: ELB" to "HealthCheckType: EC2" keeps this in check for now.

In my prior attempt on v1.0 of the template (issue #7), I was definitely running into the Burst Credit issue, which now based on 75GiB of dummy data and my interpretation of the Dashboard Widgets, appears not to be an issue in this most recent attempt on V2.01.

In reviewing the Safari web inspector, there is a significant difference in Time to First Byte: mysite.com <1 seconds, newsite.mysite.com could be anywhere from 7-15+ seconds. Then, the page loads very quick on mysite.com and is long on newsite.mysite.com.

Before I re-engage AWS Tech Support, I wanted to check in here...

Darryl, I would welcome your collaboration and/or your guidance on how to narrow down root cause--any thoughts or suggestions?

Anyone else have a similar experience that they resolved and could share some thinking here?

Very much see the value in this Architecture and can't wait to get it fully functional for our business needs.

Thank you, Mike

michael-newman commented 6 years ago

@darrylsosborne , would appreciate any thoughts/suggestions... thank you.

GiuseppeIuculano commented 6 years ago

Yes,, EFS is a performance killer, you really should not use it for a Wordpress site

michael-newman commented 6 years ago

For our site, the root cause of the latency is/was within the Elegant Themes Divi Theme--specifically, there is a theme/plugin compatibility loader class that checks for compatibility issues to resolve.

Apparently, Divi runs fine on a single server infrastructure; but, on this multiple server infrastructure, this compatibility loader is called on EVERY page load, and hence, the latency. We fixed this in our theme files and provided code to Elegant Themes to fix on their end.

This all said, I can't help but wonder if there is something on infrastructure side that may not play nicely with this popular theme. Perhaps this infrastructure exacerbated an existing unnoticed Divi issue or the infrastructure simply introduced a new element not previously considered by Divi.