There are lots of benefits to consider when using AWS like scalability, security, and efficiency. There are also concerns to consider like configurations, architecture, and price. Set it up correctly, and your solution can weather almost any storm. Set it up incorrectly and you will have non stop issues.
Many popular server solutions are actually built on the AWS architecture. If you would like to cut out the middle man and configure it to meet your needs, this article can help. We have spoken about the Hyper Availability solutions offered by AWS and you can implement these into your architecture. Note that a good AWS setup will utilize non AWS solutions like fail2ban to help secure your EC2 and varnish to help cache your website.
AWS Architecture
There are a few ways to go with this. Many people like the load balanced architecture. With an Amazon EFS (NFS mount), both servers share the same operating system and connect to a single RDS database instance. You then have your favorite toolset in front of that like maybe a WAF Firewall, CloudWatch monitoring, or a Route 53 router. Those are all nice and Amazon has a plethora of tools to tickle your wallet
We propose that consumers don’t forget to optimize their EC2 server instances in ways that avoid the need to extend the was architecture. For example, a varnish server (HTTP accelerator) can help to cache your site, preventing you from having to extend your CloudFront CDN to an unusually long TTL or adding more servers. With concepts employed by varnish-like stale cache, your backend will never be hit directly with traffic.
A solution like Apache SOLR can further enhance the caching and responsiveness of your website. Granted this step is still in the experimental phase, we push the bounds here at BePro Software. We believe that you should consider software and hardware solutions when building a true Hyper Available architecture.
Configuration
Did you know that if your user-agent isn’t allowed via CloudFront, your visual editor won’t work in WordPress? Someone needs to be more than an AWS expert to fix this, they have to also be able to navigate WordPress. As WordPress and AWS experts, we come across these fine details that plague systems. I’m sure you will agree that not caching WordPress for admin users is a smart configuration to implement. How about disabling aggressive caching so that the browser attempts to at least fetch the frontend admin menu. There are many configurations to consider
EC2’s need to have an Amazon EFS (NFS mount) vs R-syncing the serves. Ultimately, you don’t want a situation where you edit something via the admin on one server but it only takes effect on one server. Many plugins create new files e.g. cache plugins. You wouldn’t want your cache settings to only be configured on one server. An NFS mount will make sure that the servers share the same file system, removing the chance of the servers not being in sync
Storing your files on S3 is great. Let’s set up a subdomain to handle the requests which will be more efficient than your main site trying to. This is another level of optimizing the configuration and implementation of the architecture. This way, there is no chance that WordPress tries to load a heavy 404 page if the image is not found.
Testing
Testing is an important aspect of software development. That includes websites. Moreover, it includes both the website itself and the architecture it sits on. How else would you know that the setup is configured correctly and capable of surviving changes in traffic?
A staging server is an obvious step in this equation. However, we mean the actual components themselves need to be tested. CloudFront distributions can be accessed via host files on your personal computer before you set them to manage your website traffic live. Varnishtest should be used to test your Varnish setup before you point your CloudFront setup to it
Failure to take this step seriously can manifest themselves far into the future. Small gremlins in the operation that no one can track down. Or worse, errors in execution that cause the company money. The creation of a good architecture demands the need for a good testing plan before its deployed
Conclusion
Building your WordPress solution on AWS can be very robust. In fact, popular services like WPEngine use AWS to provide their service. Remove the middle man and implement a solution that works for your needs. With that right configuration, we can manage concerns and respond to changes in your website traffic
One thing to remember is that this setup does require WordPress and AWS experts. Luckily our team can help. If you are interested in moving your WordPress website to the AWS Cloud or need help troubleshooting your setup, contact us today