After you add a domain name to Alibaba Cloud CDN, we recommend that you specify a cache expiration time, specify a bandwidth cap, and configure HTML optimization. The features help increase the cache hit ratio, reinforce security, and improve content retrieval efficiency.
Increase the cache hit ratio and accelerate content delivery
In most cases, slow content delivery is related to low cache hit ratios. We recommend that you specify a cache expiration time and configure the parameter filtering feature to increase the cache hit ratio.
Scenario | Description | References |
The cache hit ratio is low and content retrieval is slow | The time-to-live (TTL) value for cached content is smaller than required or no cache expiration rule is created, which causes requests to be frequently redirected to the origin server. Specify a proper TTL value to increase the cache hit ratio and accelerate content retrieval. We recommend that you specify a TTL value based on the following rules:
| |
By default, client requests are redirected to the origin server with the complete URLs retained, including parameters that follow the question mark ( |
For more information about the causes of low cache hit ratios, see Causes of low cache hit ratios.
Improve service security
To prevent bandwidth spikes that are caused by attacks, you can configure the monitoring and alerting features to monitor bandwidth values. Alternatively, you can specify a bandwidth cap.
Scenario | Description | References |
Prevent high bandwidth values | You can specify a bandwidth cap. If a bandwidth value during a statistical period exceeds the bandwidth cap, Alibaba Cloud CDN suspends acceleration and resolves the domain name to an invalid address | |
You can set alert rules in CloudMonitor to monitor bandwidth values. This allows you to detect and manage bandwidth anomalies at the earliest opportunity. |
Improve service performance
You can configure HTML optimization, object chunking, and intelligent compression based on your business requirements. This helps reduce file sizes, accelerate content delivery, and improve page readability.
Scenario | Description | References |
Improve service performance | Alibaba Cloud CDN automatically removes redundant content from web pages, such as comments and additional whitespace characters in HTML pages, CSS code, and JavaScript code. This helps reduce file sizes and accelerates content delivery. | |
Clients retrieve specified file chunks from the origin server. In scenarios such as large file distribution, the amount of back-to-origin traffic can be reduced and content retrieval efficiency can be improved. | ||
Alibaba Cloud CDN points of presence (POPs) use Gzip to compress text files before the files are returned to users. This reduces the size of the requested files, accelerates content delivery, and reduces bandwidth usage. |