by laumars · 6y ago · 0 comments
First of all, lets bare in mind this is talking about larger, enterprisey installs. So what would you need if you hosted on-prem:
- a DB with a read replica in case your main DB died (RDS can actually build read replicas for you pretty easily so this part of the deployment would be much easier than doing the same MySQL replication config on-prem)
- Redis for caching (my experience with WP is a couple of years out of date now but when I last managed an highly popular WP install (several in fact) Redis or Memcached caching was a necessity to get the kind of page load times our visitors expected)
- Shared storage (bare in mind you're running more than one WP web server - if this was on prem you'd be hosting those files off a SAN)
- A load balancer (I don't think I need to explain a justification for that one)
- And probably a CDN too (reduce the stress on your web-servers and internet gateway)
That's literally the bare minimum any large Wordpress application would need and that's all that AWS architecture is outlying. Sure there's a few more items on there like NAT gateways but those are just network stacks that are deployed as part of your VPC (or in on-prem terms, that's just the VLAN and/or subnet management that you'd assign to your load balancer).
If you don't need multiple web-servers nor high availability then your architecture becomes drastically simpler (no load balancer, no shared storage, no replica DB, etc) but also you would run the risk of downtime and even data loss. Which might not be an issue for some people but it's also not one of the selling points of AWS. So you'd be better off with shared hosting or a managed WP service -- or to put it another way, AWS was never going to be a good fit.
edit: Personally I think the issue here is more WP -- or rather the classical CMS design -- than it is AWS. A static site generator style of CMS would be a lot simpler cloud design and run a lot cheaper too. WP is designed from an era when web shops had this infrastructure set up by default.
I self-hosted Wordpress for years and yes this architecture is not unreasonable for a high volume site. Now I pay WP Engine a fixed annual fee and all this comes out of the box with a few clicks.
wordpress may not, the org deploying it might.
AWS feels like hosting on IIS back in the day. It was extremely expensive and pointless for more than 50% of their customers, but people kept saying “but we’re enterprise!” and throwing money away until the world finally woke up.
Where AWS really comes into is stuff like serverless (yeah, I hate that term too), auto-scaling, object storage, etc. I've got a few static sites that are compiled in AWS Code Build whenever I push new markdown to GitHub (literally just using shell scripts and pandoc). They're then pushed to S3 and sat behind CloudFront. It costs me a few dollars a month to host, I don't need to think about scaling and I get near instant page load times. Running that kind of thing on-prem wouldn't even come close to being as cheap nor convenient as AWS.
This is why I commented about WP being ill-suited for modern cloud deployments in my edit.
To be clear, I'm not claiming AWS are the only hosting providers to offer the aforementioned. The same arguments can be made for and against GCP, Azure and so on and so forth. I'm also not advocating that everyone should switch away from WP or adapt their workloads for the cloud. People should just use what works for them the best. I'm only commenting on why that AWS architecture isn't as insane as it first appears.
You need this complexity in an enterprise environment because the web teams don't have access to databases, and the DBAs aren't allowed to manage databases outside of the data network, etc. That's why enterprise content management exists. Big companies and public sector value repeatability and seperation of duties over cash and time.
12F apps, microservices, etc. are much _cheaper_ to run on AWS because you don't have to worry about scaling/provisioning/and HA/DR capabilities are basically baked in. A lambda that processes 100,000 requests/day is, on average from the teams I've worked with, significantly cheaper to run than a machine in a DC that is always up.
I used to unequivocally scoff at "the cloud", but I used to think it was "MySQL as a service" or "VMs as a service" when it is able to be so much more with cloud native tooling.`
In reality, when we had to add Wordpress to our workloads, there was nothing special we had to do except for introducing EFS. All our workloads before that didn't require keeping state on a file level.
And just like that we had a scalable/HA Wordpress setup with pretty decent performance.
A MediaWiki install I manage has a more complicated deployment, files reside on DigitalOcean spaces so there’s no NFS bullshit but there’s still multiple instances each of nginx-ingress, trafficserver, memcached, mysql, nginx/php-fpm, keycloak, cronjobs to run background tasks and a managed load balancer in front of it all.
Still, then bill in comparison to AWS is cheap - base costs are $125USD/mo for the 6 droplets and spaces storage. We just enabled auto scaling for the MediaWiki instances so it can vary a bit now, but traffic is bursty so it won’t go up by much.
The example included was to show HA for any CMS/dynamic application. You could easily sub in Wordpress for just about anything. It accounts as an example and not a complete recommended solution, though it could be one depending on your needs. But because it comes from QuinnyPig it gets more Internet points.
https://github.com/aws-samples/aws-refarch-wordpress
Good luck automating it that much on-premise.
Otherwise agree with your post. All depends on the business needs.