aMiSTACX AWS EC2 Speed Optimization Tips

Our stacks are designed for simplicity and speed, and we have continually improved on both since our launch in June 2017.

Almost all of our new stacks have a few items worth noting, and we wish to share a few tips should you be tweaking the most out of your page speed and quality scores.

For simple deployments we recommend making use of Cloudflare as your CDN/DNS provider. Coupled with our stacks you can achieve grade A performance on just about any speed and quality test.

Items to note while testing:

vhost object caching

  • If your aMiSTACX Apache stack comes with vhost object caching pre-configured, make sure the Apache headers module is enabled! This can provide a big boost in score and increase your loading speed. To check simply from CLI:

sudo a2enmod headers

If prompted to restart Apache, then that means vhost object caching was off and now enabled. Restart Apache to take effect.

sudo service apache2 restart

Google PageSpeed

  • If your stack includes the Google Apache PageSpeed Module [Enabled by default for WordPress, and Disabled by default for Magento] then you have an opportunity to tweak the configuration to achieve even higher scores.You’ll have to refer to the pagespeed module documentation for advanced configurations as they are beyond the scope of this article. Magento requires the PS module to be enabled. Please make sure you do proper A/B testing with PS enabled/disabled, and be mindful of potential Redis conflicts. To enable PS on Magento:

sudo a2enmod pagespeed

sudo service apache2 restart

Then modify the apache pagespeed.conf file to turn PS on.

cd /etc/apache2/mods-available

sudo nano pagespeed.conf

Around line 4 set to on: ModPagespeed on

sudo service apache2 restart

Redis Caching

  • All of our G3/G4 stacks have Redis caching. For Magento this local server caching engine is really a stable and useful alternative to other caching engines. We have it automatically enabled, just follow your stack guide on how to implement it for Magento. For WordPress, Redis is disabled by default, and you will need to find a good plugin to leverage its use. Should you opt for simplicity, please be sure to check out our S3 Titanium plugin for WordPress.

CloudFlare Config

  • If you decided to use CloudFlare for your CDN, then a little note worth trying A/B testing with is with CloudFlare’s Rocket Loader. In some cases it will improve your quality scores [good], but also increase the page loading times [not good], and in others instances it will decrease your quality scores [not good], but keeps page loading times about the same [not good]. So with a simple toggle of on/off you can A/B test Rocket Loader’s impact on your aMiSTACX stack, and make the call to keep it on or off based on your results.

Magento 2.2.x

  • Without a doubt, making use of our new S3 Titanium for Magento 2.2.x will help put a smile on your face when you see how fast your site loads. No more Magento piggy here.

WordPress S3 Titanium

  • Finally a plugin that not only handles image compression and deployment to S3, but also includes static deployment and RDS read replicas. We’re talking about our S3 Titanium Module for WordPress! Lots of bells-n-whistles to explore.

G4 Stacks

  • Without a doubt make sure you use our new G4 stacks. These are state-of-the-art stacks built on Ubuntu 18.04 LTS with features like PHP 7.3 and AWS T3 class support. Plus lots and lots of performance tweaks 😉

Bookmark this page and check periodically. We will provide more tips.

~ Lead_Robot

Leave a comment