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!