Content Delivery Network (CDN) is a new layer of network architecture added to the existing Internet, consisting of high-performance acceleration nodes distributed globally. These high-performance nodes store business content according to a certain caching strategy. When a user requests specific content, the request is routed to the nearest service node, which directly responds quickly, effectively reducing user access latency and improving availability.
Assuming the business acceleration domain is www.test.com, after the domain is connected to the CDN and starts using acceleration services, the actual processing flow when a user initiates an HTTP request is as shown in the following diagram:
Detailed explanation is as follows:
For business scenarios like portal websites, e-commerce, UGC communities, etc., CDN offers robust capabilities for accelerating the distribution of static content (such as webpage styles, images, small files), significantly enhancing the user experience of web pages.
For business scenarios like game installation package retrieval, mobile ROM upgrades, application package downloads, etc., CDN provides stable, high-quality download acceleration. With a massive reserve of elastic bandwidth and the ability to handle bursts of extremely large traffic, businesses can provide users with a lightning-fast download experience.
In scenarios involving online audio and video playback, CDN can offer a stable, smooth, and rich viewing experience.
After understanding the acceleration principle, accessing a CDN request first requires DNS resolution to determine the nearest node IP address to the user. Then, the request is sent to the CDN node to check for cached resources. If not found, it goes back to the origin server. This is the overall process.
Therefore, when encountering issues with accessing a CDN, troubleshooting typically involves examining the mentioned stages. Broadly speaking, the main categories are origin server issues and CDN issues.
If the origin server is abnormal, services cannot be provided externally or if the origin server has security policies in place, such as firewall restrictions on source IPs.
For CDN website acceleration, CNAME resolution needs to be configured for the domain to be accelerated. Incorrect configuration can lead to inaccessibility.
Issues with cache configuration, origin fetching configuration, and access control configuration.
CDN node malfunction, unable to respond to user requests or responding with errors.
Assuming the business acceleration domain is www.test.com and the origin domain is www.origin.com, with HTTP access for both. If the accelerated domain URL http://www.test.com/1.jpg is replaced with http://www.origin.com/1.jpg and the origin URL cannot be accessed normally, it indicates an issue with the origin server.
The following troubleshooting approaches are all based on Tencent EdgeOne as an example.
Add a new acceleration domain, configure DNS resolution with the domain service provider. As shown in the figure below, on the domain resolution of xxx-proxy.qcdntest.com.cn, configure a CNAME record pointing to xxx-proxy.qcdntest.com.cn.eo.dnse5.com.
Using the MAC terminal, you can confirm the DNS resolution of a domain name using the dig command. In the figure below, the CNAME resolution has been correctly configured. The action of configuring a CNAME record is referred to as "traffic switching" in CDN terminology.
Check cache configurations such as .php;.asp;.aspx;.jsp; and other suffixes. Dynamic resources like those with .php endings cannot be statically accelerated. If dynamic resources like URLs ending in .php have .php suffix caching enabled, it may lead to the website not opening properly.
For instance, if the origin server only supports HTTP access, configuring EdgeOne origin fetch as HTTPS will result in access anomalies.
Check the EdgeOne configuration to see if access control is configured. If access control is configured, ensure that the corresponding access policies are met.
By connecting your domain to Tencent Cloud EdgeOne, you can also use self-diagnostic tools to assist with anomaly diagnosis. Input url such as https://xxx-proxy.qcdntest.com.cn/example.html, to generate a diagnostic link.
Use separate domain names for different resources (dynamic, static) to configure different acceleration types for each resource, maximizing benefits.
In summation, this article bridges the theoretical and practical aspects of CDNs, offering insights into their effective use and troubleshooting. By understanding why CDNs are crucial for modern web infrastructure, how to adeptly manage them, and efficiently problem-solve potential impediments, web administrators can ensure their websites remain accessible to users worldwide, thereby ensuring uninterrupted service and optimal performance.
Tencent EdgeOne is a comprehensive edge computing platform. It integrates various services such as content delivery network (CDN), security, and edge computing to provide a unified solution for accelerating and securing web applications and content. By leveraging Tencent's extensive global network infrastructure, EdgeOne aims to enhance the performance, reliability, and security of online services, ensuring a seamless user experience across different regions and devices.
We have now launched a free trial, welcome to Contact Us for more information.