A diagram illustrating the cdn network


1. The user enters the domain name www.web.com into the browser, and the browser first finds that there is no local DNS cache, and requests it from the DNS server of the website;

2. The DNS domain name resolver of the website is set with CNAME, which points to www.web.51cdn.com, and the request points to the intelligent DNS load balancing system in the CDN network;

3. The intelligent DNS load balancing system parses the domain name and returns the IP node with the fastest response to the user to the user;

4. The user sends a request to the IP node (CDN server);

5. Since it is the first visit, the CDN server will request the original website and cache the content;

6. The request result is sent to the user.


The CDN network is to add a Cache layer between the user and the server. How to guide the user's request to the Cache to obtain the data of the source server is mainly realized by taking over DNS. This is the most basic principle of CDN. Of course, many details are not involved. , such as step 1, first request the local DNS server. Step 5, content elimination mechanism (according to TTL), etc. But the principle is generally the same.

When a user visits a website that joins the CDN service, the domain name resolution request will be finally handed over to the global load balancing DNS for processing. Global load balancing DNS provides users with the node address closest to the user at that time through a set of pre-defined policies, so that users can get fast service. At the same time, it also maintains communication with all CDNC nodes distributed around the world, collects the communication status of each node, and ensures that user requests are not distributed to unavailable CDN nodes. In fact, global load balancing is done through DNS.

For ordinary Internet users, each CDN node is equivalent to a WEB placed around it. Through the control of the global load balancing DNS, the user's request is transparently directed to the nearest node, and the CDN server in the node will respond to the user's request like the original server of the website. Since it is closer to the user, the response time is necessarily faster.

Each CDN node consists of two parts: a load balancing device and a cache server

The load balancing device is responsible for the load balancing of each cache in each node to ensure the work efficiency of the node; at the same time, the load balancing device is also responsible for collecting the information of the node and the surrounding environment, maintaining the communication with the global load DNS, and realizing the load balancing of the whole system. The CDN management system is the guarantee for the normal operation of the entire system. It can not only monitor the various subsystems and equipment in the system in real time, and generate corresponding alarms for various faults, but also monitor the total traffic in the system and the traffic of each node in real time, and save it in the system database, so that the The network administrator can easily carry out further analysis. Through the perfect network management system, users can modify the system configuration.

In theory, the simplest CDN network can run with a DNS responsible for global load balancing and a Cache for each node. DNS supports resolving different IPs based on the user's source IP address to achieve nearby access. In order to ensure high availability, etc., it is necessary to monitor the traffic and health status of each node. When the number of Caches on a node is insufficient, multiple Caches are needed, and when multiple Caches work at the same time, a load balancer is needed to make the Cache groups work together.

Reprinted from: http://blog.csdn.net/coolmeme/article/details/9468743


1. The user enters the domain name www.web.com into the browser, and the browser first finds that there is no local DNS cache, and requests it from the DNS server of the website;

2. The DNS domain name resolver of the website is set with CNAME, which points to www.web.51cdn.com, and the request points to the intelligent DNS load balancing system in the CDN network;

3. The intelligent DNS load balancing system parses the domain name and returns the IP node with the fastest response to the user to the user;

4. The user sends a request to the IP node (CDN server);

5. Since it is the first visit, the CDN server will request the original website and cache the content;

6. The request result is sent to the user.


The CDN network is to add a Cache layer between the user and the server. How to guide the user's request to the Cache to obtain the data of the source server is mainly realized by taking over DNS. This is the most basic principle of CDN. Of course, many details are not involved. , such as step 1, first request the local DNS server. Step 5, content elimination mechanism (according to TTL), etc. But the principle is generally the same.

When a user visits a website that joins the CDN service, the domain name resolution request will be finally handed over to the global load balancing DNS for processing. Global load balancing DNS provides users with the node address closest to the user at that time through a set of pre-defined policies, so that users can get fast service. At the same time, it also maintains communication with all CDNC nodes distributed around the world, collects the communication status of each node, and ensures that user requests are not distributed to unavailable CDN nodes. In fact, global load balancing is done through DNS.

For ordinary Internet users, each CDN node is equivalent to a WEB placed around it. Through the control of the global load balancing DNS, the user's request is transparently directed to the nearest node, and the CDN server in the node will respond to the user's request like the original server of the website. Since it is closer to the user, the response time is necessarily faster.

Each CDN node consists of two parts: a load balancing device and a cache server

The load balancing device is responsible for the load balancing of each cache in each node to ensure the work efficiency of the node; at the same time, the load balancing device is also responsible for collecting the information of the node and the surrounding environment, maintaining the communication with the global load DNS, and realizing the load balancing of the whole system. The CDN management system is the guarantee for the normal operation of the entire system. It can not only monitor the various subsystems and equipment in the system in real time, and generate corresponding alarms for various faults, but also monitor the total traffic in the system and the traffic of each node in real time, and save it in the system database, so that the The network administrator can easily carry out further analysis. Through the perfect network management system, users can modify the system configuration.

In theory, the simplest CDN network can run with a DNS responsible for global load balancing and a Cache for each node. DNS supports resolving different IPs based on the user's source IP address to achieve nearby access. In order to ensure high availability, etc., it is necessary to monitor the traffic and health status of each node. When the number of Caches on a node is insufficient, multiple Caches are needed, and when multiple Caches work at the same time, a load balancer is needed to make the Cache groups work together.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325837407&siteId=291194637