CDN Network Acceleration Principle
The full name of CDN is Content Delivery Network, that is, content
delivery network. The purpose is to add a new network architecture to the
existing Internet and publish the content of the website to the network
"edge" closest to the user, so that users can obtain the desired
content nearby and improve the response speed of users visiting the website.
This article is reproduced from the WeChat public account
"Programmer Xiaofan", author Fan Mili. To reprint this article,
please contact the programmer's Xiaofan public account.
CDN
The full name of CDN is Content Delivery Network, that is, content
delivery network. The purpose is to add a new network architecture to the
existing Internet and publish the content of the website to the network
"edge" closest to the user, so that users can obtain the desired content
nearby and improve the response speed of users visiting the website. CDN is
different from mirroring because it is smarter than mirroring, or you can make
a metaphor: CDN = smarter mirroring + caching + traffic diversion. Therefore,
CDN can significantly improve the efficiency of information flow in the
Internet network. Technically, it solves the problems of small network
bandwidth, large user visits, uneven distribution of outlets, etc., and
improves the response speed of users visiting the website. Below is a simple
CND diagram
As shown in the figure above, it is a schematic diagram of a
common CDN architecture. Its workflow can be summarized as follows: When a user
visits a website that has joined the CDN service, first use DNS redirection
technology to determine the best CDN node closest to the user, and at the same
time, the user The request points to this node. When the user's request arrives
at the designated node, the CDN server (the cache on the node) is responsible
for providing the content requested by the user to the user. The specific
process is: the user enters the domain name of the website to be visited in his
browser, the browser requests the local DNS to resolve the domain name, the
local DNS sends the request to the main DNS of the website, and the main DNS is
determined according to a series of policies The most appropriate CDN node at
that time, and the result of the analysis (IP address) is sent to the user, and
the user requests the content of the corresponding website from the given CDN
node
Working Principle
The CDN network adds a Cache layer between the user and the
server, which is mainly achieved by taking over the DNS and directing the
user's request to the Cache to obtain the data of the source server, thereby
reducing the network access time.
Access Process Without Cache Service
First, let's take a look at the access process of the traditional
uncached service:
Access process of the website after using CDN cache