Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use a CDN (Content Delivery Network‎)? [duplicate]

I noticed that most of the tutorials online make use of a CDN instead of just adding a new file (be it CSS or jQuery) locally and just referencing it in the manner of <link href="~/Content/css/footer.css" rel="stylesheet" />. I read about it but it still does not make a lot of sense as to why you would use a CDN. Besides for better caching, why would you make use of a CDN instead of coding your file locally and just referencing it?

like image 721
Lebone Avatar asked Jan 06 '23 23:01

Lebone


2 Answers

It simply Decrease Server Load

As a result, the strategic placement can decrease the server load on interconnects, backbones and public and private peers, which frees up overall capacity and decreases delivery costs. Essentially, the content is spread out across several servers, as opposed to offloading them onto one large server.

Make Faster Content Delivery

Since CDNs place servers as close to a group of users as possible, latency and packet loss are minimized due to a shorter distance traveled. Theoretically, the closer the content is to the user, the faster the delivery. Therefore, users will experience less jitter when streaming, fewer network spikes, and an overall improved streaming quality. Due to the reliability, operators can deliver high quality content with a high level of service, low network server loads, and thus, lower costs.

Additionally, many CDN providers offer TCP acceleration technology which boosts performance, thus improving user experience. Since CDNs decrease latency, the acceleration working in conjunction with an already high-performing network results in explosive content.

100 Percent Availability

Due to the distribution of assets across many regions, CDNs have automatic server availability sensing mechanisms with instant user redirection. As a result, CDN websites experience 100 percent availability, even during massive power outages, hardware issues or network problems.

Increase in the number of Concurrent Users

Strategically placing the servers in a CDN can result in high network backbone capacity, which equates to a significant increase in the number of users accessing the network at a given time. For example, where there is a 100 GB/s network backbone with 2 tb/s capacity, only 100 GB/s can be delivered. However, with a CDN, 10 servers will be available at 10 strategic locations and can then provide a total capacity of 10 x 100 GB/s.

Control of Asset Delivery

Another beneficial feature of CDN technology is that more control of asset delivery and network load is awarded. Operators have the ability to deliver real-time load statistics, optimize capacity per customer, display active regions, indicate which assets are popular, and report viewing details to their customers. These details are extremely important, since usage logs are deactivated once the server source has been added to the CDN.

For more reference: link

like image 194
AVI Avatar answered Jan 09 '23 19:01

AVI


The cache is one of the reasons: if I use the same jquery file as e.g. google.com does, most of the users visiting my side will not have to load it. Which decreases the loading time of my webpage.

Another reason is the global distribution of the CDN-server. If I want an image here in Germany it would take a longer time to load it from an US server than from a server here in Germany (because of latency).

like image 35
Daniel Budick Avatar answered Jan 09 '23 19:01

Daniel Budick