File Prefetch

Last update:2022-06-21 14:23:19

Overview

After a domain is enabled for CDN, there is no cached resource of that domain on the CDN edge node in the initial state. The node caching behavior is triggered by a user request. When the user requests to the CDN edge node,if there is not a cached resource on the node or the cached resource has been expired, the edge node will try to obtain the resource from CDN mid-tier node. If it is still no-cache in the mid-tier or the resource has been expired, then the system will obtain the resource from the origin site.

CDNetworks provides a file prefetch function, which can allow the customer to prefetch content of the origin site to the CDN node so that the user can hit the cache directly for the first visit, which can not only improves the first access speed but also reduce the pressure on the origin site.

Applicable scenarios:

Installation package release
Before the latest installation package or upgrade package is released, customers can preheat resources to the CDN edge node in advance. After the official launch, download requests will be responded to by the global CDN edge node directly, which will increase the download speed and reducing the pressure on the origin site as well.

Business activities
Before the business activities, preheat the static resources which will be used in the related web page to the CDN edge node in advance. After the event starts, all static resources
will be responded to by CDN edge nodes, and massive bandwidth reserves will ensure the availability of user services and enhance user experience.

Entrance

  • [Product] → [Application Services] → [Content MGMT] → File Prefetch: use the navigation bar on CDNetworks Console, go to the entrance.

Instructions

Create file prefetch task

  • Log in to the CDNetworks console, enter [Products]-[Application Services] through the left navigation bar, and click [Content MGMT] to enter [File Prefetch]-[Create Tasks]
    Self-Service Configuration for China Premium Service Onboarding
  • Enter the URL that needs to be prefetched to the CDN node according to the information on the configuration page. The URL format is described as follows:
    -The domain of each URL must be a domain accelerated by CDNetworks and have prefetch permission. Please contact our technical support if you have any question about domain prefetch permission;
    -Please enter only one URL per line.(Up to 500 URLs can be submitted each time);
    -The URL must carry the ‘http://’ or ‘https://’ protocol identifier, and is a specific URL, and does not support regular and directory. Input example: http://www.a.com/image/test.png;
    -The maximum length of each URL is 2000 characters.
    -If the URL contains Chinese characters, the submitted URL must be a Chinese-escaped URL (escaped in UTF-8).
    -The limitation for each account is 20,000 URLs one day and the total prefetch space limit is 5000M per day. Please contact our technical support if you have any questions.
  • Select whether to clear the CDN cache and then prefetch according to your needs:
    -Select ‘Yes’ to clear the cache file on all nodes involved in prefetch task, and then retrieve new files from the origin site;
    -Select ‘No’,then the edge node will retrieve the latest files from the origin site only when the cache file is not the latest one.
    Self-Service Configuration for China Premium Service Onboarding
  • Prefetch time: File prefetch supports instant prefetch and scheduled prefetch.
    Scheduled prefetching allows you to preset the task start time,the edge node will do the prefetching automatically when the preset date and time is reached.
    Self-Service Configuration for China Premium Service Onboarding

Query prefetch task

Click [File Prefetch]-[Query Tasks], you can specify the time period and keywords for preheating task query, support specified domain query, or specify complete URL for query:
Self-Service Configuration for China Premium Service Onboarding

  • Task status:
Status Definition
init Indicates that the file prefetching task is initializing
run Indicates that the task of file prefetching is being executed
success Indicates that the file prefetching task was executed successfully
wait Indicates that the task of file prefetching is queued
failure Indicates that the file prefetching task is failure
cancel Indicates that the file prefetch is cancelled (due to your subsequent operations, the previous related operations are canceled, example:there is a prefetch operation at 12:10, the task is in wait and run status, and you add another prefetch task for the same file at 12:12, the status of the previous task will be set to cancel)
  • Error info:
Category Definition
Normal The prefetch task is running normally.
Abnormal The prefetch task runs abnormally.
  • Query time: Users can query the prefetch tasks of the last 7 days.

Notice

Prefetch restrictions

  • The domain of each URL must be a domain accelerated by CDNetworks and have prefetch permission. Please contact our technical support if you have any question about domain prefetch permission;
  • Please enter only one URL per line, and change lines for multiple URLs (the URL limit for one-time submission is 500);
  • The URL must carry the ‘http://’ or ‘https://’ protocol identifier, and is a specific URL, and does not support regular and directory. Input example: http://www.a.com/image/test.png;
  • The maximum length of each URL is 2000 characters.
  • If the URL contains Chinese characters, the submitted URL must be a Chinese-escaped URL (escaped in UTF-8).
  • The default daily prefetch URL limit for each account is 20,000, and the total prefetch space limit is 5000M. Please contact our technical support if you have any question about prefetch URL/space limit;

Sub account permission configuration

  • The preheating URL and query preheating records are currently connected to the latest authority system, supporting resource (domain) authority configuration.
  • For the permissions management for sub-accounts, please refer to the IAM user guide.
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!