[Transfer] What exactly is a CDN?

I. Introduction

When I was looking at DRM before, it was mentioned that the distribution of this video is using CDN.

But I don’t know what CDN is. I heard about it when I was doing cloud services for the Internet of Things. Let’s take a look at CDN.

In today's mobile Internet era, more and more people use mobile phones to watch videos and enrich their entertainment life.

Before answering this question, let's do an arithmetic problem first.

Take the previously popular "Story of Yanxi Palace" as an example. At that time, 10 million users watched online at the same time on a certain video APP.

If you watch a video with 1080p resolution (theoretically requires 4Mbps bandwidth), then the cumulative traffic bandwidth required is 10,000,000×4Mbps=40,000,000Mbps=40Tbps.

For Internet video content providers such as Youku and iQiyi, this is undoubtedly a huge traffic pressure.

The network card of our ordinary computer has a bandwidth of 1Gbps. If Youku has a super server, then this super server needs 40,000 network cards, and must run 100% at full speed, in order to be able to achieve the smooth viewing of these 10 million users.

For some service providers who are not strong enough, or when there is a sudden increase in traffic, it will cause congestion, resulting in freezes and delays.

There is a saying: When a user opens a page and waits for more than 4 seconds, he will close the page. In other words, the user will be lost.

insert image description here
The loss of users means the loss of money. No Internet service provider wants this to happen. Therefore, they must find ways to present their content as soon as possible, shorten the user's waiting time, and improve the user's experience.

And CDN is a very effective technology to shorten the delay.

2. The Birth of CDN

In the 1980s, Internet technology had just entered the civilian field.

People mainly access the network through dial-up, the bandwidth is very low, and there are few users, so there is no pressure on the backbone network and servers.

With the explosive development of the Internet, more and more users, coupled with the emergence of broadband access networks, the pressure on content source servers and backbone networks is increasing, and they cannot respond to user access needs in a timely manner.

In 1995, Dr. Tim Berners-Lee, a professor at the Massachusetts Institute of Technology and one of the inventors of the Internet, discovered that network congestion is getting worse and will become the biggest obstacle to the development of the Internet.

Therefore, he proposed an academic problem, hoping that someone can invent a new and fundamentally problem-solving method to achieve congestion-free distribution of Internet content.

Next door to Dr. Tim Berners-Lee was the office of Professor Tom Leighton. He is a professor of applied mathematics at the Massachusetts Institute of Technology.

He was intrigued by Berners-Lee's challenge, so he asked graduate student Danny C. Lewin and several other top researchers to crack the technical problem.

Ultimately, they developed dynamic routing algorithm technology that uses mathematical algorithms to process content, effectively solving this problem. This technology is CDN.

They also set up a company specifically for this purpose to play their commercial value. This company is the originator of the later famous CDN service - Akamai.

3. Principle of CDN

The CDN technology is actually not complicated. The original core idea is to cache content near end users.

Isn't the content source far away? Then, we will build a cache server close to the user, make a copy of the remote content, and put it here, isn't it OK?

insert image description here
Because this technology distributes content, its name is CDN——Content Delivery Network, content distribution network.

Specifically, CDN uses more cache servers (CDN edge nodes) and deploys them in areas or networks where user access is relatively concentrated. When a user visits a website, the global load technology is used to direct the user's visit to the nearest cache server, and the cache server responds to the user request. (It’s a bit like a local warehouse for e-commerce, right?)

You may think, isn't this a "mirror server"? Actually different. A mirror server is a complete replica of the source content server. CDN, on the other hand, is a cache of some content, which is more intelligent.

To be precise, CDN = smarter mirroring + caching + traffic diversion.

And it should also be noted that CDN is not only able to cache video content, it can also distribute static resources of the website (such as various types of pictures, html, css, js, etc.), and static content of mobile applications (such as installation Package apk files, pictures and videos in APP, etc.) for distribution.

Let's take an example to see the specific workflow of CDN.

If a user wants to access Youku's video-on-demand content, then:

insert image description here
Specific steps:

  • ① When the user clicks on the content on the APP, the APP will go to the local DNS (Domain Name Resolution System) for IP address resolution according to the URL address.

  • ②. The local DNS system will hand over the domain name resolution right to the CDN dedicated DNS server.

  • ③. The CDN dedicated DNS server returns the IP address of the global load balancing device of the CDN to the user.

  • ④. The user initiates a content URL access request to the load balancing device of the CDN.

  • ⑤. The CDN load balancing device selects a cache server in the region to which the user belongs according to the user's IP address and the content URL requested by the user.

  • ⑥. The load balancing device informs the user of the IP address of the cache server, allowing the user to initiate a request to the selected cache server.

  • ⑦. The user initiates a request to the cache server, and the cache server responds to the user request and transmits the content required by the user to the user terminal.

  • ⑧. If the cache server does not have the content that the user wants, then the cache server will request the content from the source server of the website.

  • ⑨. The source server returns the content to the cache server, and the cache server sends it to the user, and judges whether to cache the content on the cache server according to the user-defined cache policy.

4. Benefits of CDN

The biggest benefit of using CDN technology is that it accelerates the access to the website—the physical distance between the user and the content is shortened, and the waiting time of the user is also shortened.

Moreover, the cache servers distributed to different lines also speed up the access between operators.

For example, China Mobile mobile phone users can access the content source of China Telecom network by assuming a CDN server in China Mobile to accelerate. The effect is very obvious.

Additionally, CDNs have security benefits. After the content is distributed, the IP of the source server is hidden, and the probability of being attacked will be greatly reduced. Moreover, when a certain server fails, the system will call the adjacent healthy server to provide services and avoid affecting users.

Because of the many benefits of CDN, all mainstream Internet service providers have adopted CDN technology. All cloud service providers also provide CDN services (the price is not too expensive, and it is charged by traffic).

5. CDN and communication industry

CDN is a service developed from the traditional IT industry. However, for our communication industry, CDN also has great commercial value.

Internet service providers use CDN to trade storage for latency. Spend money on CDN servers or cloud computing services in exchange for a better user experience.

Communication operators also pursue CDNs, but their purpose is to trade storage for bandwidth—to reduce the traffic pressure on the upper-layer backbone network by "sinking" services, avoid hardware expansion, and reduce network construction costs.

This is easy to understand. If a large amount of business traffic data is running around on the backbone network, the backbone network will definitely be overwhelmed and must be expanded desperately. If these business traffic data are resolved at the bottom layer, then the pressure on the bandwidth of the backbone network will naturally be relieved. Is not it?

insert image description here
Many operators have already lowered the CDN to the city level to reduce the pressure and improve user experience at the same time.

Speaking of this, did the majority of communication lovers think of anything?

That's right, this is similar to the mobile edge computing introduced a few days ago.

insert image description here
For a long time, with the continuous improvement of network capabilities, content resources and computing capabilities have been "going up" to the cloud computing center. A core cloud computing center provides services to all terminal nodes.

insert image description here
As a result, people looked back and found that for a very large area and a very large number of users, especially for national or world-class services, no matter where you set up the center or how powerful your center is , cannot overcome the barriers of physical distance, which will lead to unbearable delay and network congestion.

Ever since, people began to "sink" part of the cloud computing center, and only then did fog computing and haze computing come into being. People even began to question whether centralized computing will eventually be replaced by distributed computing?

insert image description here
In Xiaozao Jun's view, there is no question of who completely replaces whom. Different scenarios bring different requirements, and different requirements require different network architectures. The diversity of scenarios exists in reality, so the flexibility of the network architecture is also an inevitable choice.

The upcoming 5G proposes three major scenarios and slices, and uses the same network to meet different needs, which embodies such a design idea and conforms to the development direction of the trend.

All in all, for network technology, no matter it is a black cat or a white cat, in short, the cat that can catch mice is a good cat. Isn't it?

The article is over, and friends who like it are welcome to pay attention to the Zaojun WeChat public account: Xianzao Classroom

Reference link: https://zhuanlan.zhihu.com/p/52362950

Guess you like

Origin blog.csdn.net/weixin_45264425/article/details/130119570