Principles of CDN small files and CDN files

Source: Internet
Author: User

Principles of CDN small files and CDN files

The following are some of my personal knowledge, which may be incomplete or even incorrect, but I hope you can help us to correct them.


1. first, the customer needs to resolve the domain name to an IP address to access the webpage. The customer needs to send a DNS query packet request packet before the packet arrives at the ISP router, split/image may be made (personal perception split mainly refers to optical fiber splitting, while ordinary Network cables should adopt images ), it is also possible to copy the packet to DPI (redirect server) through Forward after the packet arrives at the ISP's router ).

2. after the DPI (redirection server) receives the DNS query package, it checks that the DNS is valid. If so, it locates in the service cache, return the ip address of a specified Cache Server to the client (if the cache server already has a cache, the ip address of the cache server is returned). If the ip address is invalid, the query packet is discarded, the client accesses the webpage according to the normal process. (Note that DNS lookup is actually performed in the normal DNS query process, but the DNS query results returned by CDN are faster than the normal query results, instead of the normal results) (guess, because the DNS query results returned by DPI are not received by the client according to the normal TCP process, I guess that when DPI returns a DNS query request, change the source address of the returned data packet to the real DNS address of the client)


3. After receiving the DNS data packet returned by DPI, the customer sends a request to the cache server. If the cache server already exists, the cached data is returned. If the cached data does not exist, the cache server sends a request to the Real Server, returns the request result to the customer, and caches the request.


In general, the cache server uses squid or nginx. Caching the web page is similar to the reverse proxy I used at school, but redirection is inserted in the middle, and some other functions are provided.

This is probably the process of the CDN small file. I hope you guys will point out the shortcomings in my article and learn how to modify them. Thank you!






What is the technical principle of CDN?

Cdn is image + Smart resolution. It is to cache the website content to servers across the country, and then use smart resolution to determine the bandwidth of the user from which region, and then match the nearest related line to provide access. For example, Sina has four cdn nodes nationwide. If it is a user of Xi'an Unicom, it will intelligently resolve the ip address and connect it to the nearest northwest node.
Cdn is applicable to static technologies, video streaming, game downloads, and videos. For a single-line website, it can be used to provide network acceleration. For example, China Unicom's website promotion acceleration can enable fast access for telecom users.
Disadvantage: cdn uses the cache technology and accelerates the static and public parts of the website. If a dynamic website cannot be cached, it must be accessed from the source server every time. If cdn is used, a link is added, which is not good. It is recommended that you carefully consider

What is the cdn principle?

CDN stands for Content Delivery Network (CDN. By adding a new network architecture to the existing Internet, the website content is published to the "edge" closest to the user's network, so that users can obtain the desired content nearby, solves Internet network congestion and increases the response speed for users to access websites. It comprehensively solves the problem of slow response speed caused by low network bandwidth, large user traffic, and unevenly distributed outlets.

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.