Menu

Joomla Blog

Tutorials, reviews, case studies and other tips to help website owners and website developers master the Joomla content management system.

CDN for Joomla Makes Content Delivery a Snap

CDN for Joomla Makes Content Delivery a Snap

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?
The basic idea of a CDN is that content is served from a network of computers around the world, depending on what service you choose. The images and files, such as jpgs, gifs, JavaScript and CSS, are no longer served from your own system where Joomla lives. They are made available through very powerful and distributed servers in different geographical locations. This means that your visitors get files much more quickly. It also means that your server doesn't need to work as hard, providing a faster response time for your database calls and other tasks. It could potentially save you money as well if your web hosting account charges you a lot for bandwidth.

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.

aws-domain

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.

cdn-for-joomla

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.

aws-enabled

THE VERDICT
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.

Rate this blog entry:
Front-end
Get an Expert Joomla Website Review – for Free

Related Posts

 

Comments 11

Jana Jrik on Tuesday, 02 April 2013 22:04

CDN really powers up any Joomla, Wordpress or Drupal site.
Described extension is really easy to use and make work your CDN to fast connection around the world.

For integration within minutes, CDN77 prepared for you simple manual available here http://www.cdn77.com/guides/joomla-integration

(Posted by CDN77 staff)

0
CDN really powers up any Joomla, Wordpress or Drupal site. Described extension is really easy to use and make work your CDN to fast connection around the world. For integration within minutes, CDN77 prepared for you simple manual available here http://www.cdn77.com/guides/joomla-integration (Posted by CDN77 staff)
Giovanni Yarabek on Thursday, 04 April 2013 06:34

Well done Robert. Thanks for this in depth and time consuming trial and error report! should have a link available or code, so they know how many referrals you'll be sending them. I'm making the purchase next week - had been looking at this for 2 months .... coming from you a trusted insider, I'm following your lead.

Many thanks again.
-G

0
Well done Robert. Thanks for this in depth and time consuming trial and error report! should have a link available or code, so they know how many referrals you'll be sending them. I'm making the purchase next week - had been looking at this for 2 months .... coming from you a trusted insider, I'm following your lead. Many thanks again. -G
Dan on Thursday, 04 April 2013 07:10

Thanks Robert... I started tinkering and went to the gmetrix.com site you pointed out... great link, btw!!
dealt with the first item on "my bad" list... a F rating in Leverage Browser Caching... followed the instructions... and went from PS D/67% and YSlow C/72% to a PS C87% and YSlow C73%... went back to my site and noticed an immediate improvement jumping from one page to another!... am now looking at other areas where I scored an "F"

0
Thanks Robert... I started tinkering and went to the gmetrix.com site you pointed out... great link, btw!! dealt with the first item on "my bad" list... a F rating in Leverage Browser Caching... followed the instructions... and went from PS D/67% and YSlow C/72% to a PS C87% and YSlow C73%... went back to my site and noticed an immediate improvement jumping from one page to another!... am now looking at other areas where I scored an "F"
Robert Wilson on Thursday, 04 April 2013 17:45

No problem Dan.

Yeah it's good to note that attacking the issues at the top of the list will improve your score more quickly as they are more heavily "weighted" and should be fixed first if possible.

0
No problem Dan. Yeah it's good to note that attacking the issues at the top of the list will improve your score more quickly as they are more heavily "weighted" and should be fixed first if possible.
Eng Ung on Thursday, 04 April 2013 12:26

Hi Robert, thanks for the great tutorial. I have a question though, perhaps more of a misconception, but here goes. If CDN is a network of servers spread throughout the world, what good is it if my target audience is in Australia? Would there be any speed improvements to my site?

0
Hi Robert, thanks for the great tutorial. I have a question though, perhaps more of a misconception, but here goes. If CDN is a network of servers spread throughout the world, what good is it if my target audience is in Australia? Would there be any speed improvements to my site?
Robert Wilson on Thursday, 04 April 2013 17:52

Hi Eng...you're welcome.

That's a really good question. You don't necessarily HAVE to be running a globally accessed website in order for a CDN to improve your site's speed and responsiveness.

Remember that once you offload some of those static elements, the server where your website lives has more CPU to devote to running your database and other things. Also remember that the servers on a CDN are very highly optimized for delivering images, media, JavaScript files, CSS files, etc. They will almost always do a better job than your general web server.

The best way to find out is to give it a try. It's so easy to get this set up and take it for a spin. You could definitely try it with a backed up copy of your current website to see how much improvement you'll get.

Let us know.

0
Hi Eng...you're welcome. That's a really good question. You don't necessarily HAVE to be running a globally accessed website in order for a CDN to improve your site's speed and responsiveness. Remember that once you offload some of those static elements, the server where your website lives has more CPU to devote to running your database and other things. Also remember that the servers on a CDN are very highly optimized for delivering images, media, JavaScript files, CSS files, etc. They will almost always do a better job than your general web server. The best way to find out is to give it a try. It's so easy to get this set up and take it for a spin. You could definitely try it with a backed up copy of your current website to see how much improvement you'll get. Let us know.
Boris on Thursday, 04 April 2013 23:58

Sounds so inviting, so whats the estimate payment for a small website, does anybody has any numbers.

0
Sounds so inviting, so whats the estimate payment for a small website, does anybody has any numbers.
Robert Wilson on Friday, 05 April 2013 05:11

Hi Boris,

For a website serving normal sized files to a globally distributed area, 10GB of traffic / month will run you about $1US to $2US / month it looks like.

Here's a page of pricing along with a calculator:
https://aws.amazon.com/cloudfront/#pricing

Also, note that CDN77, who has linked their site above, claims to be cheaper.

0
Hi Boris, For a website serving normal sized files to a globally distributed area, 10GB of traffic / month will run you about $1US to $2US / month it looks like. Here's a page of pricing along with a calculator: https://aws.amazon.com/cloudfront/#pricing Also, note that CDN77, who has linked their site above, claims to be cheaper.
Eng Ung on Friday, 05 April 2013 11:39

Robert, what about from an SEO point of view. What i gain in speed, I'll lose in ranking:(. I don't think there's a CDN network here in Sydney.

0
Robert, what about from an SEO point of view. What i gain in speed, I'll lose in ranking:(. I don't think there's a CDN network here in Sydney.
Robert Wilson on Friday, 05 April 2013 15:28

Eng,

How will you lose ranking? Faster performing sites actually rank better in Google.

Everything is a balancing act though. You have to consider pros and cons with whatever changes you make on your websites.

0
Eng, How will you lose ranking? Faster performing sites actually rank better in Google. Everything is a balancing act though. You have to consider pros and cons with whatever changes you make on your websites.
Eng Ung on Friday, 05 April 2013 15:54

Hi Robert,
Sorry you're right there, I mistakenly thought that you had to upload your site to Amazon in the U.S.

0
Hi Robert, Sorry you're right there, I mistakenly thought that you had to upload your site to Amazon in the U.S.

Free Joomla TutorialLearn Joomla for free with our 16 lesson, 2 hour course.

Get Started