By Jimin Lee on Jul 24, 2014 9:30:00 AM
What is CDN?
A content delivery network or content distribution network (CDN) is a large distributed system of servers located in multiple data centres across the world. The goal of a CDN is to serve content to end-users with high availability and high performance. CDNs work for a large fraction of the Internet content today, including web objects (text, graphics and scripts), downloadable objects (media files, software, documents), applications (e-commerce, portals), 'live' streaming media, on-demand streaming media, and social networks.
How a CDN speeds up your website
As I mentioned above, a CDN is a network of these servers based throughout the globe. When a visitor accesses your website—whether she is from Singapore, Boston, Paris, or New Delhi—the server closest to the visitor delivers the view of the website. When another person in the same part of the world accesses the website, that server makes copies of the contents so when more people asks for such contents, they are delivered from around the corner instead of across the globe. Since there is less physical distance to travel, the content loads quicker. This shift is imperceptible to the end users who only experience the page loading as requested.
When should I use a CDN?
There are 3 scenarios where using a CDN may be appropriate:
1. When large files need to be served quickly to users
2. Speeding up website load times
3. Offloading work from the main web servers
A CDN is an option that you should look at whenever you run into any of the above scenarios. Setting up a CDN can be much quicker and cheaper than setting up massive storage areas for content, reworking your website to expand horizontally across multiple servers, or purchasing bigger equipment for your servers.
Why are CDNs becoming so popular?
There are several reasons why a CDN could benefit your website and company.
1. Different domains
Browsers limit the number of concurrent connections (file downloads) to a single domain. Most permit four active connections so the fifth download is blocked until one of the previous files has been fully retrieved. You can often see this limit in action when downloading many large files from the same site.
2. Files may be pre-cached
jQuery is ubiquitous on the web. There's a high probability that someone visiting your pages has already visited a site using the Google CDN. Therefore, the file has already been cached by your browser and won't be downloaded again.
3. High-capacity infrastructures
You may have great hosting but I bet it doesn't have the capacity or scalability offered by Google, Microsoft or Yahoo. The better CDNs offer higher availability, lower network latency and lower packet loss.
4. Distributed data centers
If your main web server is based in Dallas, users from Europe or Asia must make a number of trans-continental electronic hops when they access your files. Many CDNs provide localized data centers which are closer to the user and result in faster downloads.
5. Built-in version control
6. Usage analytics
Many commercial CDNs provide file usage reports since they generally charge per byte. Those reports can supplement your own website analytics and, in some cases, may offer a better impression of video views and downloads.
7. Boosts performance and saves money
A CDN can distribute the load, save bandwidth, boost performance and reduce your existing hosting costs, often for free.
Do I need a CDN if my customers are only in one country?
The concise answer is yes, especially if you are in a large country like the United States. The longer answer is that if your country is very small, and you are very sure that you only need to communicate with people in your country, then you might not need one. America is a good example of a large country where CDNs offer qualitative improvements to page speed, whereas Liechtenstein (a country with only 70 square miles) is an example of a small country.