Docs
ucdn
FAQ

FAQ

Domain Access & Domain Resolution

Q: What are the requirements for domains to be accelerated by CDN?

A: When accessing CDN acceleration, for accelerating regions within China, it is necessary to complete the filing with the Ministry of Industry and Information Technology, and the business content of the source station must be legal, otherwise your domain cannot be accessed. The business content of the source station for accelerating overseas regions must be legal.

Q: What is the difference between page acceleration, download acceleration, and on-demand acceleration, and how should I choose?

A: Difference: The content of acceleration is different, page acceleration is mainly for small files such as web pages and image files; download acceleration is mainly for large files such as installation packages and compression packages; on-demand acceleration is mainly for video files such as MP4.

Selection: Generally, if the file is larger than 5M, it is recommended to access the large file platform. If it is a video file, select on-demand acceleration.

Q: Is dynamic acceleration supported?

A: Support for dynamic acceleration and full site acceleration, caching for static requirements, and route back to source for dynamic requests.

Q: Is pan-domain acceleration supported?

A: Pan-domain acceleration is supported: using wildcards as acceleration domain names to represent the acceleration of all secondary domain names; for example, if the acceleration domain name configured in UCDN is “.abc.com”, then the corresponding secondary domain names aaa.abc.com, bbb.abc.com can be resolved to the CNAME of the pan-domain .abc.com in UCDN for acceleration.

Domain Configuration

Q: How long does it take to configure CDN?

A: The CDN configuration time generally does not exceed 30 minutes. If you set up and wait more than 30 minutes, you can contact technical support for assistance.

Q: Is http://www.xxx.com/abc.jpg and http://www.xxx.com/abc.jpg?t=xxx considered to be 2 different files?

A: Whether it is a different file depends on your configuration. If you configure to ignore parameter caching, the two issues will be regarded as the same file. If you don’t configure to ignore parameter caching, it will be judged as two different files.

By default, download acceleration and on-demand acceleration ignore parameter caching, and page acceleration does not ignore parameter caching.

Q: What is the default cache rule for different acceleration types?

A: Page acceleration: By default, dynamic files such as php, aspx, asp, jsp, do, dwr, etc. are not cached and are directly transparent, and static file types such as shtml, html, htm, js are cached by default for 1 day, other static files are cached by default for half a day. Page acceleration does not ignore parameter caching by default.

Download acceleration and on-demand acceleration: By default, all files are cached for 30 days, and parameters are ignored by default.

Whole site acceleration: By default, all files are not cached.

Q: When there is a Cache-Control field in the Response HTTP Header of the source station, what is the hierarchy of the cache policy?

  • If the Cache-Control field is max-age, the caching time of this resource is mainly based on the caching time configured by the acceleration domain name, and does not inherit the time specified by max-age.
  • If the Cache-Control field is no-cache or no-store, the CDN node will not cache this resource.
  • When there is no Cache-Control field in the Response HTTP Header, the caching time configured by the acceleration domain name is the main one.

Q: Does it support MD5 anti-hotlinking, how to configure the anti-hotlinking of acceleration domain name?

A: MD5 anti-hotlinking is supported. Users need to provide a designated key and synchronize technical support for configuration

k = md5(key + file URI + expiration time t)

1、k: URL parameter name, md5(value), md5 is 32-bit.

2、t: Expiration time, such as the current is 2012-04-23 16:20:00, the validity period is set to 2 hours, the expiration time is 2012-04-23 18:20:00, which is converted to seconds based on 1970, which is the value of parameter t.

3: Key: User provides key string.

Example: URL: http://tysxtest.ufile.abc.com.cn/test/3e2_teacher_720p.mp4

Key: whaty321;

Expiration time: 2 hours. If it expires at 12:00 on 2019-07-01, after conversion, t=1561953600;

k=md5(whaty321/test/3e2_teacher_720p.mp41561953600)=1100bda530528404109eaa80bd9fb9d8

URL after adding anti-hotlinking: http://tysxtest.ufile.abc.com.cn/test/3e2_teacher_720p.mp4?k=1100bda530528404109eaa80bd9fb9d8&t=1561953600

The URL using the anti-hotlinking can be normally accessed, and the access is invalid if k does not correspond. If it is verified that the time of t has exceeded the valid time, the verification will fail.

Prefetch Push

Q: CDN Refresh Prefetch Limit

A: The daily refresh limit per domain is 700 files and 20 directories; prefetch limit is 500.

Q: Does the traffic generated during CDN prefetching be charged?

A: After accessing CDN acceleration, the traffic generated during prefetching will not be charged.

Q: Is the file on the CDN node the latest after refreshing?

A: No, after refreshing a file, the cached file on the CDN node will be cleared. When the user initiates a request again, because the CDN node does not cache this file, it will pull back the file from the source and cache the file according to the caching rules configured by the accelerated domain name.

Cache Related Questions

Q: How can I judge whether the content accessed by users on the CDN node is hit?

A: You can view it through the developer tools of the browser or “curl - I + file URL”. If cached, it will display hit. When it is hit, the CDN node caches the content requested by the user. If it is miss, the CDN node does not cache the content. At this time, it will go back to the source to get data to respond to the user, and cache the content on the CDN node according to the cache policy configured by the domain name.

Q: The website content has been updated, but why is it still the old content when opening the page?

A: After using CDN acceleration, files will be cached on the CDN node according to the caching policy configured by the domain name. Since the cache time has not expired, users may still access the old content. It is recommended to refresh the corresponding content when the website content is updated.

Q: Why is the hit rate of CDN relatively low?

A: Generally speaking, user data hotspots. The larger the access volume of the file, the higher the hit rate; under normal circumstances, the download business hit rate is relatively high, above 95%, the on-demand business is about 90%, the webpage file hit rate is low, and there are some dynamic resources, the hit rate is related to its website nature , Basically around 75%.

Low hit rate mainly checks the following situations:

  • The website traffic is low, the file heat is not enough, the CDN node receives fewer requests, the validly cached files are fewer, resulting in the user’s request cannot hit the node, affecting the hit rate is low.
  • The caching rules of the acceleration domain name are not reasonably configured. The caching time for some files is short or not cached, causing the CDN node to frequently return to the source and the hit rate decreases
  • The caching HTTP Header of the source station is not set properly. The Header contains no-cache, cache-control=0, etc., which will be treated as the highest priority by CDN and execute no caching.
  • There are more dynamic resources at the source station, most of which are not cacheable content, which will also cause frequent back to the source to fetch.

Q: How to get the final user IP?

A: After officially switching to use the CDN service, the request will add x-forward-for header by default through the edge acceleration node, carrying the real IP information of the client, and the log will also save the user IP request.

Q: What if the content obtained by CDN is inconsistent with the source station?

A: First determine whether the file’s MD5 is consistent

If the files are inconsistent, you can refresh the resources in the console’s content management. Generally, it takes about 5~10 minutes to complete the refresh.

Q: When creating a CDN acceleration domain name, the domain name acceleration type is selected incorrectly, eg: the business is website acceleration, but download acceleration is selected during creation, can it be modified?

A: The acceleration type cannot be modified, you can delete the domain name and recreate it. Different acceleration types do not support switching to each other.

Data Collection

Q: How are the bandwidth data and traffic data values drawn by real-time monitoring?

A: Real-time monitoring displays the traffic and bandwidth data of the accelerated domain name under the account. The source is the downstream bandwidth/traffic of all nodes, excluding the back-to-source bandwidth/traffic.

Q: How is the real-time monitoring dot bandwidth, traffic, requests, hit rate data calculated?

A: Bandwidth statistics are based on the peak value of 1 minute (the smallest display unit) adding up / the average value of the time granularity. For example, if the time granularity is 5 minutes, the bandwidth value is the sum of the peak bandwidth values of 5 minutes /5 ; The traffic and request data are the data added up every minute; the hit rate = the byte hit percentage of each time interval.

Q: How long is the delay of real-time monitoring data approximately?

A: The delay of domestic data is about 5-10 minutes, and the delay of overseas data is about 15-25 minutes.

Exception Troubleshooting

Q: Using CDN acceleration, the source station is an Alibaba Cloud host, and what should I do in the case of 5xx situation?

A: When there is no abnormality in both CDN acceleration and source station, it may be that Alibaba Cloud host cloud shield limits back-to-source requests, and CDN back-to-source nodes need to be added to the cloud shield whitelist.

Q: How to initially locate CDN exceptions?

A: 1. Open the hosts file (windows is located in: C:\Windows\System32\drivers\etc directory, OS system)

  1. Add the source IP and corresponding fault domain name. (Such as 192.168.11.11 www.abc.com there is a space between the two, and IP is first)

  2. Save the modifications to the hosts file and restart the browser, visit the domain name to see if there are still problems with the visit, if there are still problems, it is a source station failure, if the visit is normal, please contact DezaiCloud technical support in time.

Q: Why does it still generate bandwidth and costs after stopping UCDN domain name acceleration.

A: The user’s local DNS still has DNS resolution cache. During the cache expiration period, it will request to the corresponding node, generate a small amount of bandwidth traffic, and the DNS resolution cache time is controlled by the regional operators.