Before describing the implementation principles of CDN, let’s first look at the traditional access process without caching services, so as to understand the difference between CDN cached access and non-cached access:

From the diagram above, we can see that the process for users accessing a website without CDN caching is:
1) The user provides the domain name to be accessed to the browser;
2) The browser calls the domain name resolution function library to resolve the domain name and obtain the IP address corresponding to this domain name;
3) The browser uses the obtained IP address to send a data access request to the domain name’s service host;
4) The browser displays the web page content based on the data returned by the domain name host.
Through the above four steps, the browser completes the entire process from receiving the domain name that the user wants to access to obtaining data from the domain name service host. A CDN network adds a Cache layer between the user and the server. The way to direct user requests to the Cache to obtain data from the origin server is mainly achieved by taking over DNS. Let’s now look at the process of accessing a website after using CDN caching:

From the diagram above, we can understand that the access process for a website using CDN caching becomes:
1) The user provides the domain name to be accessed to the browser;
2) The browser calls the domain name resolution library to resolve the domain name. Since CDN has adjusted the domain name resolution process, the resolution function library generally obtains a CNAME record corresponding to that domain name. To get the actual IP address, the browser needs to resolve the obtained CNAME domain name again to obtain the actual IP address. During this process, global load-balanced DNS resolution is used, such as resolving to the corresponding IP address based on geographic location information, allowing users to access the nearest node.
3) This resolution yields the IP address of the CDN cache server. After obtaining the actual IP address, the browser sends an access request to the cache server;
4) Based on the domain name provided by the browser that it wants to access, the cache server uses its internal dedicated DNS resolution to obtain the actual IP address of that domain name, and then the cache server submits an access request to this actual IP address;
5) After obtaining the content from the actual IP address, the cache server, on one hand, saves it locally for future use, and on the other hand, returns the obtained data to the client, completing the data service process;
6) After receiving the data returned by the cache server, the client displays it and completes the entire browsing data request process.
Through the above analysis, we can conclude that in order to be transparent to ordinary users (i.e., after adding caching, users do not need to make any configuration changes on the client side and can simply use the original domain name of the accelerated website to access it), and to provide acceleration services for a specified website while minimizing the impact on the ICP, it is only necessary to modify the domain name resolution part of the entire access process to achieve transparent acceleration services. Below is the specific operational process of CDN network implementation.
1) As an ICP, you only need to delegate the domain name resolution authority to the CDN operator, without making any other modifications. In practice, the ICP modifies the resolution records of their domain name, generally using the CNAME method to point to the address of the CDN network Cache server.
2) As a CDN operator, you first need to provide public resolution for the ICP’s domain name. To implement sortlist, the ICP’s domain name resolution results are generally pointed to a CNAME record;
3) When sortlist is required, the CDN operator can use DNS to specially process the resolution process of the domain name pointed to by the CNAME, so that the DNS server, upon receiving a client request, can return different IP addresses for the same domain name based on the client’s IP address;
4) Since the IP address obtained from the CNAME carries hostname information, after the request reaches the Cache, the Cache must know the origin server’s IP address. Therefore, an internal DNS server is maintained within the CDN operator to resolve the actual IP address of the domain name being accessed by the user;
5) When maintaining the internal DNS server, an authorization server must also be maintained to control which domain names can be cached and which cannot, in order to prevent open proxy situations.
CDN Technical Approaches
The main technical approaches for implementing CDN are high-speed caching and mirror servers. They can operate in two modes: DNS resolution or HTTP redirection, with content delivery and synchronized updates completed through Cache servers or remote mirror sites. The DNS method has a user location determination accuracy rate of over 85%, while the HTTP method has an accuracy rate of over 99%. Generally, the ratio of incoming user access data volume at each Cache server cluster to the data volume of content fetched by the Cache server from the origin website is between 2:1 and 3:1, meaning that 50% to 70% of the repeat access data volume to the origin website is offloaded (mainly images, streaming media files, and similar content). For mirrors, except for data synchronization traffic, everything else is completed locally without accessing the origin server.
Mirror Site servers are commonly seen. They enable straightforward content distribution and are suitable for static and quasi-dynamic data synchronization. However, the cost of purchasing and maintaining new servers is relatively high, and mirror servers must also be set up in various regions with professional technical personnel assigned for management and maintenance. When large websites update servers in various locations at any time, the demand for bandwidth also increases significantly, so typical internet companies do not establish too many mirror servers.
The high-speed caching approach has lower costs and is suitable for static content. Internet statistics indicate that over 80% of users frequently access content from 20% of websites. Under this pattern, cache servers can handle the majority of client static requests, while the original WWW server only needs to process approximately 20% of non-cached requests and dynamic requests. This greatly accelerates client request response times and reduces the load on the original WWW server. According to a survey by IDC in the United States, as an important indicator for CDN —— the caching market is growing at a rate of nearly 100% per year, with global revenue projected to reach 4.5 billion USD by 2004. The development of network streaming media will further stimulate demand in this market.