Symptoms

CDN adds cache nodes to the existing network to cache resources retrieved from the origin server to the network nodes closest to the requesters. When the resources are requested again, CDN returns the resources directly from the cache instead of retrieving them from the origin server. This helps to improve the access speed of the website.

Causes

CDN cache nodes are classified into L1 nodes and L2 nodes. L1 nodes are distributed across provinces and cities in the Chinese mainland, and L2 nodes are distributed in several regions. The following figure shows the architecture of the nodes.CDN cache nodes
CDN nodes cache resources based on the following strategy:
  1. When a client sends a request to a domain name, it first requests the IP address of the domain name from the local DNS server. If no record is found on the local DNS server, the local DNS server queries the IP address from the authoritative DNS server. After the IP address is acquired, Alibaba Cloud CDN allocates the optimal nodes for this request based on the intelligent scheduling system.
  2. The client then sends a connection request to the CDN node. If the requested resource has already been cached on the L1 node, the L1 node directly returns the resource to the client. If the requested resource is not cached on the L1 node, the L1 node requests the resource from the L2 node. If the resource is cached on the L2 node, the L2 node returns the resource to the L1 node, which then returns the resource to the client. If the resource is not cached on the L2 node, the L2 node requests the resource from the origin server and caches the resource based on the configured cache policy.