Joomla is an amazingly useful CMS that has been used to build almost every type of site imaginable. Unfortunately, it isn't always the easiest platform to optimize. One tool that web developers have used on larger sites is a CDN. A CDN is a Content Delivery Network, and their usage is becoming much more common for smaller websites and small businesses. Companies such as Amazon are making it very easy to utilize a CDN, and in this article, we'll look at an extension that makes integration with a CDN pretty simple.
WHAT IS A CDN?
Content Delivery Networks used to be large expensive setups that were only applicable to sites that were streaming lots of video or audio. This is no longer the case. Amazon has an offering called CloudFront that is pretty easy to set up and very affordable, although you'll need to check pricing for yourself to make sure. We decided to check out how well Joomla worked with the combo of Amazon CloudFront and CDN for Joomla! by popular extension developer NoNumber.
There are several other CDN related extensions, such as jomCDN and CloudFlare, but we went with CDN for Joomla! for this report because it is Non-Commercial, has a very good rating on the JED and we have liked NoNumber's extensions in the past.
We won't go heavily into cloud storage and the related services, but you should know a little about that if you're going to give this a try. We went with Amazon CloudFront for a few reasons. It's easy and cheap for one. We know it well from using their S3 storage with Akeeba Backup, and Amazon is a household name, meaning that there is a good chance your site will stay up and running when you use this service.
CloudFront is not S3 storage. You will have to learn how this works, and you will need to create a new "distribution" for this setup, but it's much easier than it sounds. You can manage everything through their web portal, the AWS Console, but be aware that there are also third party tools, such as CloudBerry and Cyberduck that will allow you to manage all of your cloud services in one easy tool as well.
We used this tutorial from anythingdigital to set up CloudFront for use with CDN for Joomla. It's a good walkthrough, but it is a little outdated as it was written a couple of years ago. It still worked perfectly though.
HOW DOES IT WORK?
NoNumber will work with several different CDN services. They even suggest a couple other than Amazon on their site. The setup of the plug-in is pretty much the same whatever CDN service you use.
The CDN setup is the "hard part" simply because the plug-in installation and setup is so easy. When you set up your CloudFront distribution, you will be given a domain to use. This is what you enter in the plug-in.
You download the plug-in and install as normal, then you'll need to enable it and configure a couple of settings. You can leave almost everything set to default until you know more about what you're doing.
You'll need to make sure your CloudFront distribution is set to Download and not Streaming. Once you create your CloudFront distribution, you'll have to wait about 15 minutes or so as it populates...or whatever it does in cyberspace. After Amazon tells you that your status is Deployed, you're good to go.
The site tested for this article got an immediate bump from a D grade to a C grade in YSlow after the CDN setup. You can use gtmetrix.com to test both YSlow and PageSpeed Insights at once. YSlow is notoriously difficult to get a very good grade with. It's also really important to do actual end user testing since this is what will make the most difference in the real world. The speed difference on our test site was very much improved.
Overall this is a very easy setup, and it made a pretty big speed difference on our test site. There are other things to take into consideration, such as how to expire cache when you make changes, and that's an article in itself. If you try this on your sites, make sure you read up on how to invalidate objects in Amazon AWS Console. It's pretty easy, but you don't want to go invalidating an entire Joomla site over and over as that can get very expensive. Object versioning is the other option to look into for this.
Content Delivery Networks have come a long way in usefulness for the everyday webmaster. CDN for Joomla goes a long way towards making them really easy to set up. The extension is available as a free download, and there is a professional version as well that allows you to use HTTPS and multiple CDN sets (URLS) and comes with support.
For more information visit NoNumber's website.