Understand the Principle of CDN Acceleration in One Article

Source: Internet
Author: User
Keywords cdn network cdn meaning cdn meaning programming
1. What is CDN
The full name of CDN is (Content Delivery Network), that is, content delivery network. Its purpose is to add a new CACHE (cache) layer to the existing Internet, and publish the content of the website to the node closest to the user's network "edge", so that users can obtain the content they need nearby, and improve users The response speed of visiting the website. Technically, it solves the reasons of small network bandwidth, large user visits, uneven distribution of outlets, etc., and improves the response speed of users visiting the website.
Simply put, the working principle of CDN is to cache the resources of your origin site on CDN nodes located all over the world. When users request resources, they will return the resources cached on the nodes nearby, without requiring every user's request to be returned to you. Source station acquisition, avoid network congestion, relieve source station pressure, and ensure the speed and experience of users accessing resources


CDN node

The optimization effect of CDN on the network is mainly reflected in the following aspects
Solve the "first mile" problem on the server side
Alleviate or even eliminate the impact of interconnection bottlenecks between different operators
Reduce the pressure on export bandwidth in various provinces
Relieved the pressure on the backbone network
Optimized the distribution of online hot content


2. The working principle of CDN

The process for users to access websites without CDN cache is:

1.The user enters the domain name to be accessed, and the operating system queries LocalDns for the ip address of the domain name.
2.LocalDns queries ROOT DNS for the authorized server of the domain name (here assumes that the LocalDns cache expires)
3.ROOT DNS responds with the domain name authorization dns record to LocalDns
4. After LocalDns obtains the authorized dns record of the domain name, it continues to query the ip address of the domain name from the authorized dns of the domain name
5. After the domain name authorized dns queries the domain name record, it responds to LocalDns
6. LocalDns responds to the client with the obtained domain name ip address
7. After the user gets the domain name ip address, visit the site server
8. The site server responds to the request and returns the content to the client.

The access process of the website after using CDN cache becomes:

1.The user enters the domain name to be accessed, and the operating system queries LocalDns for the ip address of the domain name.
2.LocalDns queries ROOT DNS for the authorized server of the domain name (here assumes that the LocalDns cache expires)
3.ROOT DNS responds with the domain name authorization dns record to LocalDns
4. After LocalDns obtains the authorized dns record of the domain name, it continues to query the ip address of the domain name from the authorized dns of the domain name
5. After the domain name authorized dns queries the domain name record (usually CNAME), respond to LocalDns
6. After LocalDns gets the domain name record, it queries the smart dispatch DNS for the ip address of the domain name
7. Intelligent scheduling DNS responds to LocalDns with the most suitable CDN node ip address according to certain algorithms and strategies (such as static topology, capacity, etc.)
8. LocalDns will get the domain name ip address and respond to the client
9. After the user gets the domain name ip address, he visits the site server
10. The CDN node server responds to the request and returns the content to the client. (On the one hand, the cache server saves locally for later use, and on the other hand, it returns the acquired data to the client to complete the data service process)

Through the above analysis, we can get that in order to achieve transparent access to ordinary users (the user client does not need to make any settings after using the cache) access, it is necessary to use DNS (domain name resolution) to guide users to access the Cache server to achieve transparent acceleration services. Since the first step for users to access a website is domain name resolution, it is the simplest and most effective way to guide users to visit by modifying dns.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.