All Products
Search
Document Center

CDN:(Optional) Configure system-recommended features

Last Updated:Jul 31, 2023

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:

  • Specify a TTL value of one month or longer for static files that are infrequently updated, such as images and application packages.

  • Specify a TTL value based on your actual workloads for static files that are frequently updated, such as JavaScript and CSS files.

Add a cache rule

By default, client requests are redirected to the origin server with the complete URLs retained, including parameters that follow the question mark (?). After you enable the parameter filtering feature, the parameters that follow the question mark (?) in the request URL are removed when the client retrieves resources from the origin server. This improves the cache hit ratio and reduces the number of requests that are redirected to the origin server.

Ignore parameters

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 offline.***.com, which cannot be accessed.

Configure bandwidth caps

You can set alert rules in CloudMonitor to monitor bandwidth values. This allows you to detect and manage bandwidth anomalies at the earliest opportunity.

Set an alert rule

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.

Configure HTML optimization

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.

Object chunking

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.

Use the Gzip compression feature