7 Reasons NOT to use a Content Delivery Network

Share this article

While there are many compelling reasons to use a Content Delivery Networks (CDN), you should consider the following situations before placing essential files on other domains… 1. Additional complexity A link to a CDN file won’t work if you’re developing offline. That’s rarely an issue, but some developers have temperamental internet connections or need to work on the move. You also likely to require a build process or manual intervention when deploying your site to a live server. It will be necessary to CDN-ize local links to JavaScript libraries and other assets. It could become complicated if you’re using a service such as Amazon S3 to host some resources but not others. 2. Files may not be optimized Consider a modular library such as Modernizr or YUI. Free CDN-hosted files are available but they generally provide all the common functionality within a large package that may exceed several hundred Kb. If you just require a few features, you can use your own specialized versions and merge all CSS and JavaScript files to invoke fewer HTTP requests. The result is smaller files which download quicker and execute faster — especially on mobile devices. That said, you could upload optimized files to a private CDN but you would need to consider the additional effort and cost that would incur. 3. There are no pre-caching guarantees While there’s a higher probability a popular CDN file has been pre-cached, it’s not a given. In particular, mobile devices tend to have small and fairly inefficient caches. The advantages may be negligible, especially if you can host a smaller file on your local server. 4. Blocked access We live in a world with geographic, legal, political, and commercial boundaries. It’s not uncommon for organizations or whole countries to block the domains or IP address of popular free CDN services. Similarly, companies such as Google and Microsoft must adhere with US export laws. There are known restrictions on use of data in Cuba, Iran, North Korea, Sudan and Syria. The list of blocked countries can change on the whim of any government. 5. Two points of failure It’s catastrophic when your site goes down and, despite a good reliability record, CDNs aren’t infallible. There’s little you can do but wait for the service to resume. It would be possible to use a CDN and fall-back to local files if the service isn’t available. It’s a solution which provides a good level of redundancy — at the expense of further development and complexity. 6. Security If security is a major concern, don’t use a public CDN. When a remote file is called, information about the referrer is also sent. Remotely-hosted JavaScript libraries are particularly risky since the code could be modified to collect data about your users or systems. Similarly, your CDN options will be more limited if you require HTTPS. 7. Loss of control Are you happy handing control of website files to Google, Microsoft, Amazon or any other large web company? Are you concerned they’re collating information about your website and systems? Do those companies have too much control over the net? Perhaps it’s paranoia, but you have a reason to be paranoid when everyone’s out to exploit you! If you’re feeling dizzy from all these pros and cons, come back soon for the final installment: Should You Use a Content Delivery Network?

Frequently Asked Questions (FAQs) about Content Delivery Networks (CDNs)

What are the potential security risks of using a CDN?

While CDNs can enhance the security of a website by providing DDoS protection and other security features, they can also pose potential security risks. For instance, if a CDN provider is compromised, all the websites it serves could potentially be affected. Additionally, some CDN providers may not fully support HTTPS, which could expose sensitive data to potential threats.

How does a CDN affect SEO?

A CDN can have both positive and negative impacts on SEO. On the positive side, a CDN can improve website speed and performance, which are important ranking factors for search engines. However, if not properly configured, a CDN can lead to duplicate content issues, which can negatively impact SEO.

Can a CDN cause website downtime?

In some cases, a CDN can cause website downtime. If a CDN provider experiences technical issues or outages, it could potentially affect the availability of your website. However, most reputable CDN providers have robust infrastructure and redundancy measures in place to minimize the risk of downtime.

How does a CDN affect website analytics?

A CDN can potentially affect website analytics by masking the true IP addresses of visitors. This can make it difficult to accurately track visitor locations and other data. However, most CDN providers offer solutions to this issue, such as adding a header to requests that contains the original IP address.

Can a CDN improve website performance for all users?

While a CDN can significantly improve website performance for users who are geographically close to its servers, it may not provide the same benefits for users who are far away. This is because the speed benefits of a CDN are largely dependent on the proximity of the user to the CDN’s servers.

Is a CDN necessary for small websites?

Whether a CDN is necessary for a small website depends on the specific needs and goals of the website. If the website has a global audience or requires high performance and speed, a CDN can be beneficial. However, for small websites with a local audience, a CDN may not be necessary.

Can a CDN replace a web hosting service?

No, a CDN cannot replace a web hosting service. A CDN is designed to cache and deliver content from a website, but it does not actually host the website. You still need a web hosting service to store your website’s files and data.

What are the costs associated with using a CDN?

The costs of using a CDN can vary widely depending on the provider and the specific needs of your website. Some CDN services offer free plans, while others charge based on the amount of data transferred, the number of requests, or other factors.

Can a CDN affect the loading speed of dynamic content?

Yes, a CDN can affect the loading speed of dynamic content. While CDNs are primarily designed to deliver static content, some CDN providers offer dynamic content delivery services. These services can help to improve the loading speed of dynamic content by caching it at the edge of the network.

How does a CDN handle mobile traffic?

Most CDN providers are designed to handle mobile traffic effectively. They do this by using responsive design techniques to deliver content that is optimized for the device and network conditions of each individual user. However, the effectiveness of a CDN in handling mobile traffic can vary depending on the provider and the specific configuration of the CDN.

Craig BucklerCraig Buckler
View Author

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.

CDNweb hosting
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week