Take the 2-minute tour ×

I was going through Best Practices for Speeding Up Your Web Site from developer site of yahoo...

  • What are the advantages and disadvantages of using CDN(Content Delivery Network)?

  • When to use CDN?

  • Is CDN a performance booster?

share|improve this question
add comment

closed as not constructive by Bo Persson, RobV, dmeister, Blazemonger, bmargulies Oct 30 '12 at 21:51


4 Answers

up vote 16 down vote accepted

What are the advantages and disadvantages of using CDN?

  • The disadvantages may be that it costs money, and it adds a bit of complexity to your deployment procedures.

  • The main advantage is an increase in the speed with which the content is delivered to the users.

When to use CDN?

  • It will be most effective when you have a popular public website with some type of static content (images, scripts, css, etc).

Is CDN a performance booster?

  • In general, yes. When a specific request is made by a user, the server closest to that user (in terms of the minimum number of nodes between the server and the user) is dynamically determined. This optimizes the speed with which the content is delivered to that user.
share|improve this answer
add comment

One other item to consider (that has recently been thrust upon us): Your clients may block the CDN! I'm using Microsoft's CDN for jQuery and last fall we chnaged from the microsoft.com host name to ajax.aspnetcdn.com (to avoid the unneeded cookies when downloading jQuery). Since then we have had several customers with network filters that blocked aspnetcdn.com and had to manually whitelist it.

We will continue to use the CDN, but it opened our eyes to yet another problem it could cause.

share|improve this answer
very important things to be aware of. –  icarus74 Jun 26 '11 at 5:23
UPDATE: We had to stop using the CDN and go back to hosting jQuery ourselves because close to a dozen customers blocked it. –  n8wrl Feb 22 '12 at 13:10
This happened at my job as well (major web site that I shouldn't name). –  jcollum Aug 6 '12 at 0:33
add comment

Each CDN provider is different but you should really look into their network and how it might effect your target audience, especially so if your website audience is heavily localised in one part of the world.

In our testing, we found the majority of users (depending on which ISP they where connecting from) where not seeing any performance benefit as the CDN provider we were looking at using was not paired with their upstream provider. Packets were not being routed along the "main tubes" and performance would have dropped had we gone ahead.

With that said the above situation is probably not all that common, but it's still good idea to test. Bring up a version of your site using resources from a CDN and test in different locales and on different connections and measure the results.

There are other benefits as well; browsers taking advantage of multiple domains and having more simultaneous requests, less load for your server etc. Generally speaking, CDN is a good option.

share|improve this answer
add comment

cdn is a performance booster if a lot of content come from the cdn.

normal you have 2 connections each time to get content for each domain so each item is a connection

if you have content on a cdn from a other domain you have more connections for your site and your site will load faster

i use normally a cdn for js libs and only if i trust the cdn and check the uptime from the cdn you want to use

share|improve this answer
If you are going to use a cdn use it for static content so you can use the cdn for other websites to –  Marco Jan 27 '10 at 8:30
r you refering js to google cdn for jquery... –  Oscar Jan 27 '10 at 8:30
yes, for js like jquery or google things –  Marco Jan 27 '10 at 8:30
Or did you mean to set up a own cdn ? –  Marco Jan 29 '10 at 11:23
To Bo Person and other that closed this question: It is WRONG to close such an interesting thread! When you look at the answer you find very interesting points. The answers here are exactly the sort of stuff I was looking for. WHO are you to decide that this is a non constructive question? GOD? I think that the number of reputation points have got you drunk... –  Didier Levy Jan 29 '13 at 13:58
add comment
