CDN Basic Work Process

Source: Internet
Author: User

Read some of the introduction of CDN articles, I feel this is the most clear to speak.

The use of CDN will greatly simplify the maintenance of the site system, site maintenance personnel only need to inject the site content into the CDN system, through the CDN deployed in each physical location of the server for the full network distribution, you can achieve cross-carrier, cross-region user coverage. Because CDN pushes content to the edge of the network, a large number of user access is scattered around the edge of the network, no longer constitutes a site export, the interconnection of resource crowding, and no longer need to cross long-distance IP routing.

How does a CDN work? Let's take a look at how a Web site provides services to users without a CDN service.

Today we see the site system is basically based on the B/s structure. b/S architecture, or browser-server (browser server) architecture, is a change or improvement of the traditional C/s architecture. In this architecture, the user simply uses a generic browser, and the primary business logic is implemented on the server side. b/S architecture, mainly using the continuous mature WWW browser technology, combined with a variety of browser script language (VBScript, JavaScript, etc.) and ActiveX technology, on the common browser to achieve the C/s architecture requires complex software to achieve the powerful features.

The user accesses the site through a browser, etc., as shown in procedure 1-2.

Figure 1-2 Internet User Service access process

① users enter the domain name of the website they want to access in their browser.

The ② browser requests the resolution of the domain name from the local DNS server.

③ local DNS server if the cache has the result of resolving this domain name, it responds directly to the user's resolution request.

④ The local DNS server does not have a cache of parsing results for this domain name, recursively requests resolution to the entire DNS system, and then responds to the browser with the result.

The ⑤ browser obtains the domain name resolution result, is the domain name corresponding service device IP address.

The ⑥ browser requests content from the server.

The ⑦ server transmits the user request content to the browser.

After adding a CDN between the website and the user, the user will not feel anything different from the original. The simplest CDN network has a DNS server and several cache servers to run. A typical CDN user accesses the dispatch process as shown in 1-3.

Figure 1-3 Typical user access process after introducing a CDN

① when the user clicks on the content URL on the site page, after the local DNS system resolves, the DNS system eventually gives the domain name's resolution to the CDN dedicated DNS server that the CNAME points to.

The ②CDN DNS server returns the global Load Balancer device IP address of the CDN to the user.

The ③ user initiates a content URL access request to the CDN's global load balancer device.

④CDN the global Load balancer device selects a zone load balancer device for a user's zone based on the user's IP address and the content URL requested by the user, telling the user to initiate a request to the device.

⑤ Regional Load balancing device will provide the user with the choice of a suitable cache server to serve, the choice is based on: According to the user's IP address, determine which server is nearest to the user; Determine which server has the user's content according to the content name that is carried in the URL requested by the user , query the current load of each server, determine which server is still capable of service. Based on the comprehensive analysis of these conditions, the zone load balancing device returns the IP address of a cache server to the global load balancer device.

The ⑥ global load Balancing device returns the IP address of the server to the user.

⑦ the user initiates a request to the cache server, the cache server responds to the user request and transmits the user's required content to the user terminal. If the cache server does not have the content that the user wants, and the Zone equalization device still assigns it to the user, the server will request content to its top-level cache server until the source server that traces the Web site pulls the content locally.

According to the User IP address, the DNS server resolves the domain name to the cache server IP address of the corresponding node, and realizes the user's nearest access. Using a CDN service website, simply give the domain name resolution to the CDN's GSLB device and inject content into the CDN to accelerate content.

Reprint Address: http://book.51cto.com/art/201205/338756.htm

CDN Basic Work Process

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.