What are the advantages and disadvantages of using a content delivery network (CDN)?

Viewed 33901
4 Answers

What are the advantages and disadvantages of using a content delivery network (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 a CDN?

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

Is a 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.

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.

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

Normally you have two connections each time to get content for each domain so each item is a connection.

If you have content on a CDN from another domain you have more connections for your site and your site will load faster.

I normally use a CDN for JavaScript libraries and only if I trust the CDN and check the uptime from the CDN you want to use.

Related