When Alibaba Cloud Content Delivery Network (CDN) accelerates the delivery of static resources to a user, CDN caches the resources on the point of presence (POP) that is nearest to the user. When the resource is requested again, the POP directly returns the cached resource to the user without redirecting the request to the origin server. If the resource that is requested by the user does not exist on the POP or has expired, the POP retrieves the latest data from the origin server.
Related features
The following table describes the operations that you can perform on a domain name by using the caching feature.
Feature | Description |
Time-to-live (TTL) is the amount of time that a resource is cached on CDN points of presence (POPs). When the TTL of a cached resource ends, the resource on the POPs expires. Requests that attempt to access expired resources are redirected to the origin server. The retrieved resources are returned to the clients and cached on the POPs. You can create a cache rule for resources based on file directories or file name extensions. | |
When an Alibaba Cloud Content Delivery Network (CDN) point of presence (POP) fetches a resource from your origin server, the origin server returns a response status code. You can configure a cache duration for these status codes in CDN. When a client requests the same resource again, the CDN POP returns the status code directly without performing an origin fetch. This reduces the load on your origin server. When the cache duration for the status code expires, a new origin fetch is triggered. | |
You can use this feature to set the time-to-live (TTL) of static resources on CDN points of presence (POPs) based on the status codes of origin responses. | |
The outgoing response headers are a component of the header section in response messages that are transmitted over HTTP. HTTP response headers deliver specific parameters to clients to manage caching. You can configure outgoing response headers and allow Alibaba Cloud CDN to return the configured response headers. This way, specific features, such as cross-origin resource sharing (CORS), can be implemented. | |
After you create a custom error page, when the requested content does not exist or an error occurs, the point of presence (POP) returns the custom error page instead of the default error page. A custom error page improves user experience and allows users to view more user-friendly error prompts. | |
If the directory of a resource on the origin server changes, the directory of the resource on points of presence (POPs) also changes. If the request URL to the resource does not change, POPs need to rewrite the request URL and redirect the request to the destination path. This reduces the number of origin requests and improves client access performance. | |
Allows you to set a cache key for a type of request that is destined for the same resource file. This can help you save the cache space and reduce the number of requests redirected to the origin server. You can configure custom cache keys by creating rules that generate cache keys based on different parts of an HTTP request, such as the URI, request parameters, HTTP request headers, or custom variables. This feature converts requests for the same file into a single cache key, which prevents the same request from being cached as different files. As a result, this improves the cache hit rate, reduces origin fetches, and decreases response times and bandwidth consumption. | |
After you configure cache sharing, accelerated domain names in the same Alibaba Cloud account can share resources that are cached on Alibaba Cloud CDN points of presence (POPs). If origin servers of different domain names store a large number of common resources, such as images, CSS files, and JavaScript files, you can configure cache sharing. This way, the domain names can share the common resources to reduce the bandwidth usage and increase the resource hit ratio for the domain names. This improves the acceleration performance of Alibaba Cloud CDN and reduces origin traffic. | |
After you add your service to Alibaba Cloud CDN, you can configure HTTP response headers to enable cross-origin access to your resources. |
FAQ
-
How do I determine whether a resource is cached on a CDN/DCDN POP?
-
How do I resolve a low CDN/DCDN cache hit ratio caused by variable parameters in URLs?
-
How do I configure files to be fetched directly from the origin server instead of being cached?
-
Why is the content not up-to-date even though the cache TTL is set to 0 in the CDN/DCDN console?
-
How do I set the server-side cache TTL when using CDN to accelerate static resources?
-
Why is the content served by CDN different from the content on the origin server?
-
What is the difference between outgoing and incoming response headers?