What is CDN?
Content delivery networks (CDNs) are basically servers in various data centers in different geographical locations that works together for fast delivery of website data to users. It is the backbone of Internet involved in Content Delivery. We are continuously using CDNs on daily basis, Knowingly or not Knowingly.
why use CDN?
CDN increases the speed of your website. They are used to reduce the “time of interaction between user and server” also known as latency i.e. delay that take place from the moment you request to load a website to the moment it content actually appears on screen
How CDN works?
To reduce the distance between the user’s and web servers, A CDN Stores a cached version of website in multiple geographical Locations(a.k.a., points of presence, or PoPs) responsible for content delivery to visitors within its proximity(range). This cached version regularly sync’s with web servers after a regular interval of time.
Over All CDN puts your content in many places at once, providing superior coverage to your users. For example, when someone in London accesses your US-hosted website, then instead of fetching data from US, User fetches data from local CDN present in UK or to the nearest CDN.
This is much quicker than having the visitor’s requests, and then server responses,
travel the full width of the Atlantic and back.
Pros and Cons of CDN
Advantages of CDN
- Improving website load times – By distributing content closer to website visitors by using a nearby CDN server (among other optimizations), visitors experience faster page loading times. As visitors are more inclined to click away from a slow-loading site, a CDN can reduce bounce rates and increase the amount of time that people spend on the site. In other words, a faster a website means more visitors will stay and stick around longer.
- Reducing bandwidth costs – Bandwidth consumption costs for website hosting is a primary expense for websites. Through caching and other optimizations, CDNs are able to reduce the amount of data an origin server must provide, thus reducing hosting costs for website owners.
- Increasing content availability and redundancy – Large amounts of traffic or hardware failures can interrupt normal website function. Thanks to their distributed nature, a CDN can handle more traffic and withstand hardware failure better than many origin servers.
- Improving website security – A CDN may improve security by providing DDoS mitigation, improvements to security certificates, and other optimizations.
Dis Advantage of servers
- It can be a disaster for automated testing. If the CDN makes silent changes to the hosted file, or turns out to be unreliable, tracking down the problem may be more difficult.
- If the CDN goes out of business, you have to re-host on your own website
- If the CDN performance is bad, it reflects badly on your website
- If you use something like jquery_latest (shown below) to obtain the most recent version, it’s possible that new, incompatible code in the library may break your existing code.
- A link to a CDN file won’t work if you’re developing offline