Principle of CDN small files

Source: Internet
Author: User

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 during normal DNS queries, but the DNS query results returned by CDN are faster than those returned by normal queries, replacing the normal results)(I guess the DNS query results returned by DPI are not received by the client according to the normal TCP process. Therefore, 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!





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.