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.
- 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.
- 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.