Is a CDN Really Worth It?

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedIn

CDNI come across articles all the time about how great a CDN (Content Delivery Network) is, and how much faster web pages load. It might help slightly, but I am not sold on a substantial increase. If you happen to find a CDN service that is very reasonable in price or free, then it might be worth exploring. Otherwise, I don’t see the benefit of using one at the current time, at least for the average site.

An optimized web page should load fast enough without needing to use one already with today’s download speeds. If your web site or pages are loading slow, then I would look into reducing the number of requests per page. You might check the size of your images while your at it as well. There is no sense in loading a huge 2 MB image into a small 250 x 250 area.

How Does A CDN Help Speed Up Page Load Time
The majority of web browsers currently can download 6 items (.css, .js, images, etc.) at a time per host (website/domain). The instant it finishes downloading one item another starts until it completes all requests. Overall, the process is fairly fast in most situations.

Basically you would store some of the above mention files in a CDN. Since that would be another host (website/domain) a web browser would then download 6 itmes from your website, and 6 from the CDN at the same time, or twice as many.

The only way that this would really help though is if you had a good balance of files per page stored in each location. If you only had a couple of files per page stored in a CDN, then it’s not going to speed things up that much.

For Example
Let’s assume that we have a web page that includes 120 requests, and that each one takes exactly 0.25 (1/4) second to download and complete.

If our web browser can make 6 simultaneous download requests that would be 5 seconds. (120 x 0.25 = 30 / 6 = 5)

Now if you put 6 of those images or files in a CDN you would have 114 request to your website, and 6 to the CDN. Assuming everything is running equally well on both servers that would only gain you 0.25 second (1/4 second or 250 milliseconds).

To me that’s just not worth paying for.

Of course there are all kinds of other variables that come into play like size of files, how optimal the servers are running, what internet speed the end user has, etc.

If you could manage to move half of the 120 request into the CDN, then yes it would be more apparent. The problem is it’s usually not possible, or not easy to accomplish this without manually changing various lines of code.

I am not complaining or against these things, but the majority of people I see using them only have a couple of files per page located on a CDN. To me that’s just a waste of time and money if they are paying for it to do very little if anything at all.

Load Time

 

How Else Can It Speed Things Up
Some providers will sync your files out to multiple datacenters. What is supposed to happen is that when a visitor makes a request to your web site from Europe for example they would be sent to a datacenter closest to them to retrieve your CDN files, and the rest they would get from your server.

That’s a nice concept that makes sense. However, I have seen routing where a visitor from Europe will be sent all the way to the U.S., then back over to a European datacenter near their location. Not always, but it happens, which would defeat the purpose entirely.

Alternatives
Since a sub-domain is technically another host/hostname you could create a sub-domain such as cdn.yoursite.com, content.yoursite.com, or similar. Then, store as many static files (.css, .js, images, etc.) as possible per page over there, and simply link to them within your post, theme/template, etc.

That way a visitor would be able to download and make 6 requests at a time to yoursite.com, and 6 to your sub-domain (cdn.yoursite.com), which could also potentially speed up page load time.

Bottom Line
Like I mentioned earlier none of these things are going to help that much if you only add a few static files, images, or what have you. That’s sort of a waste of time. It might be more work than what it’s worth just to shave off a few milliseconds of page load time, but that’s up to you to decide.

It might be worth it if there was an easy way to split your files evenly between your website and a CDN (or other host/hostname), but unfortunately I don’t see that happening in most cases.

About: Jeremy LeSarge - AKA: Ray (209 Posts)

I am the site owner and administrator of DialMe.com. I provide help and tips for Boonex Dolphin on the main part of this website where you will also find an assortment of other resources. Here, on the blog I write about a variety of topics surrounding WordPress, technology, social media/networking, SEO, and webmaster resources.




6 Comments

  1. Reply

    Hey Ray,

    I remember my older hosting service trying to convince me that I needed to go this route. Probably because I was starting to have issue due to being on a shared server but then when speaking to people who also used their service I was advised that it was best for sites like eCommerce where they have a lot of traffic, images and things on their sites.

    Since that time I’ve had other people trying to convince me that it’s the best way to go yet the few people that I know use it continue to have ongoing issues. Now my blog doesn’t load really really fast and I’ve had it cleaned up to the best of my ability but I think some of those “issues” have to do with my theme. I don’t see that going away anytime soon so I’m fine with the way it is. I also moved to a VPS service and it’s doing a little better but not fabulously.

    Either way I think I’ll stick with what I’ve got and not tread into territory that I could have issues with down the road.

    Thanks for sharing your thoughts with us, good to know.

    ~Adrienne
    Adrienne recently posted..Please Tell Me You Date Your Blog PostsMy Profile

    • Reply

      Hi Adrienne,

      Recently I checked out a site that was recommending it, and after analyzing several posts it was apparent that they were only using it for a few static images per post. To me that just isn’t worth the time involved in setting it up and testing it to make sure it is working just to save a quarter to half a second or so.

      Another site was using it more, but they had over 400 requests per page load, which still took 12-15 seconds to load. I’m not sure if they thought hey I have a CDN now I can just load up all kinds of things or what the deal with this one is. They basically made things worse (slower) at 400+ requests. I don’t see why anyone would need that much per page. If they would simply cut that down to 90-150 request, then the post would potentially load in 3-6 seconds even without a CDN.

      I could see how they might be useful for high traffic sites in the top 1000 traffic rank, but for the average website or blog that’s another story.

      I haven’t really noticed anything out of the ordinary when visiting your site. Occasionally when I click your submit comment button it takes several seconds to actually do its thing. Other than that I’ve never had any slow loading pages or Apache error pages.

  2. Reply

    Hi Ray, Wow, you explained the benefits of having a CDN better than I’ve ever seen before. Well done.

    Like Adrienne, I have a hosting company who encourages me to upgrade to a CDN every so often. It’s great to know that it’s not worth the upgrade as it’s quite expensive. I don’t have a huge budget for hosting so I’m glad I’m not wasting money on a CDN!
    Carolyn Nicander Mohr recently posted..French Girls – Let an Artist Turn Your Selfie into a Portrait (or a Joke)!My Profile

  3. Reply

    So you mean CDN is not worth it? Are there any free trials on these? So that many will try if this is not really worth trying for. Thanks for sharing this article. I got many great insights here.

  4. Reply

    Hi Ray

    I just moved web hosts on my blog and it has improved loading time somewhat. Prior to that I was on shared hosting but I’m now on VPS.

    I’ve been using Cloudflare ever since I can remember on their free account. When I was on shared hosting it did wonders with my load times but not so much on the VPS. One thing it does do though is help with my score on sites such as GTMetrix, I get a much better score with Cloudflare enabled.

    I almost decided not to activate it on the new server but I thought I’d give it a go as I’m only using the free account. I’m not sure whether that was the right decision or not now!
    Tim Bonner recently posted..Akismet – Friend Or Foe?My Profile

    • Reply

      Maybe your vps has enough speed and power on it’s own that Cloudflare no longer helps as much as when you were on shared hosting.

      I don’t know how much cpu and memory your system has, but sometimes you can tweak the Apache and MySQL configuration files for faster better performance. That all depends on your setup. Each process and service your system is running will use some of your available memory and such.

Leave Comment

Your email address will not be published. Required fields are marked *

CommentLuv badge