Lets learn "What is CDN?"
In this tutorial, we'll learn about What is CDN ( Content delivery network ) and how it works.
Introduction
Whenever you access any website on your mobile phone or laptop or any other device using the internet connection, you must have seen for some of the websites the pages load quickly, and for others, it takes considerably more time. Why is that?
Basically loading any website requires the data needs to be downloaded from the server where that particular website is hosted. For e.g, if you are accessing a website in Canada which is hosted on a server in India, it will take some time due to the latency but if that website is hosted on servers in Canada itself it will take less time to load due to low latency. So internet experience can be bad for some of the websites when clients and servers are separated by a long distance. One could argue that why not host the website on servers in all regions but that would increase the cost a lot. The better solution is to use CDN. Let's see how it works.
What is CDN?
A content delivery network (CDN) is a geographically distributed set of servers that works together to provide the fast delivery of internet content.
Netflix, Amazon Prime, and other media providers take advantage of CDN a lot to provide the best user experience of accessing media content.
How it works?
As we discussed in the introduction that we cannot keep our servers in all regions to avoid high latency due to operating costs. Instead, what we do is we keep minimal servers in all regions which cached frequently asked data like css, js, media files, etc.
So basically if some client in Canada wants to access a website which is hosted in India, Instead of requesting the data from servers in India if will look in its local CDN provider if the has the required data or not. If it is there, the CDN server will provide the data otherwise request goes to servers in India and the response will be cached in the CDN server in Canada itself so the next time we need not exchange data with servers in India.
So if a website is loading slowly it means it is not using the CDN. If you know the consumers of your website are global, you should always choose CDN. It will add some cost but it will add a lot to the consumer experience.
Benefits of CDN
- It increases the performance of your website.
- It improves security by preventing the DDoS attack.
- It reduces the load on your main server.
Some of the best CDN providers
There are a lot of companies that provide CDN. Some of them which are popular are:
- Akamai - Provides CDN to many enterprises.
- CloudFlare
- CloudFront
- Max CDN
HOPE YOU LIKE THIS TUTORIAL. FEEL FREE TO COMMENT BELOW IF YOU HAVE ANY DOUBTS. AND STAY TUNED FOR MORE TUTORIAL :)
Comments
Post a Comment