Web site Acceleration CDN (Content Delivery Network) technology principles

Source: Internet
Author: User
Tags node server

There are differences in the responsiveness of users to websites in different geographies, in order to improve the responsiveness of user access and to optimize the flow of information in existing Internet, you need to join the middle tier CDNbetween users and servers. So that users can get the information they need from the nearest users, solve the network congestion and improve the response speed, which is the popular application scheme of the large-scale website nowadays.

1. CDN Overview
    • The full name of the CDN is the Content Delivery network, which is the contents distribution networks. The goal is to add a new layer of cache (cache) to the existing Internet, publish the content of the site to a node that is closest to the "Edge" of the user's network, so that users can get the content they need nearby, increasing the responsiveness of users to the site. From the technical comprehensive solution due to the network bandwidth is small, user access is large, dot distribution is not equal reasons, improve the response speed of users to visit the site.

    • Cache layer technology to eliminate node device congestion caused by peak data access. The cache server has caching capabilities, so most Web page objects (Web Page object), such as HTML, htm, PHP and other paging files, gif,tif,png,bmp and other file formats, in the validity period (TTL), for repeated access, You do not have to re-transfer the file entity from the original site, simply pass the simple authentication (freshness Validation)-transfer a dozens of-byte header to the local copy directly to the visitor. Because the cache server is usually deployed near the client side, it can obtain the response speed of the approximate LAN and reduce the bandwidth consumption of the wide area effectively. Not only can improve the response speed, save bandwidth, for accelerating the Web server, effectively reduce the load of the source server is very effective.

    • Depending on the acceleration object, it is divided into client acceleration and server acceleration

      • Client Acceleration : Caches are deployed at the network exit, caching frequently accessed content locally, improving responsiveness and saving bandwidth;

      • Server Acceleration : Cache is deployed in front of the server as the proxy cache for Web servers, improving the performance of the Web server and accelerating access speed
        If more than one cache accelerates the server and distributes in different regions, it is necessary to manage the cache network through an effective mechanism, direct the user to the nearest access (for example, through the DNS to direct the user), the global load balanced traffic, which is the basic idea of CDN content transmission network.

    • The optimization of CDN to the network is mainly reflected in the following aspects-to solve the server-side "first kilometer" problem-mitigation or even eliminate the impact of the interconnection between the different operators-reduce the export bandwidth pressure of the provinces-relieve the pressure of the backbone network-optimize the distribution of hot content on the Internet

2. How the CDN works 2.1. Traditional access process (cache service not accelerated)

Let's look at the traditional access process for the non-cached service to see how the CDN cache access differs from the non-cached access:

By visible, the process by which a user accesses a site that is not using a CDN cache is:

    1. The user enters the domain name to be accessed, and the operating system queries the IP address of the Localdns .

    2. Localdns to ROOT DNS to query the domain name of the authorization server (this assumes Localdns cache expires)

    3. ROOT DNS responds to Localdns for domain authorization DNS records

    4. Localdns After obtaining the authoritative DNS record of the domain name, continue to authorize DNS query domain name IP address

    5. Domain name authorization DNS query domain name record, response to Localdns

    6. Localdns will get the domain name IP address that responds to the client

    7. After the user gets the domain name IP address, access the site server

    8. The site server answers the request and returns the content to the client.

2.2. CDN Access process (using the cache service)

The CDN network increases the cache layer between the user and the server, mainly by taking over the DNS implementation, directing the user's request to the cache to get the data from the source server.
Let's take a look at the process of accessing a website after using the CDN cache:

Through this, we can see that the access process of the site after the use of the CDN cache becomes:

    1. The user enters the domain name to be accessed, and the operating system queries the IP address of the Localdns .

    2. Localdns to ROOT DNS to query the domain name of the authorization server (this assumes Localdns cache expires)

    3. ROOT DNS responds to Localdns for domain authorization DNS records

    4. Localdns After obtaining the authoritative DNS record of the domain name, continue to authorize DNS query domain name IP address

    5. Domain name authorization DNS query domain name record (usually CNAME), respond to Localdns

    6. localdns get the domain name record, the IP address of the domain name is queried to the smart dispatch DNS

    7. Intelligent dispatch DNS responds to the most appropriate CDN node IP address to Localdns based on certain algorithms and policies (such as static topology, capacity, etc.)

    8. Localdns will get the domain name IP address that responds to the client

    9. After the user gets the domain name IP address, access the site server

    10. The CDN node server answers the request and returns the content to the client. (The cache server is stored locally for later use, two to return the retrieved data to the client to complete the data service process)

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

Web site Acceleration CDN (Content Delivery Network) Technical principles

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.