All Products
Search
Document Center

Dynamic Content Delivery Network:PreloadDcdnObjectCaches

Last Updated:Mar 01, 2024

Prefetches content from origin servers to points of presence (POPs). This reduces workloads on origin servers because users can hit cache upon their first visits.

Operation description

  • You can call the RefreshDcdnObjectCaches operation to refresh content and call the PreloadDcdnObjectCaches operation to prefetch content.
  • Dynamic Content Delivery Network (DCDN) supports POST requests in which parameters are sent as a form.
  • By default, each Alibaba Cloud account can submit up to 1,000 URLs per day. If the daily peak bandwidth value of your workloads exceeds 200 Mbit/s, you can submit a ticket to increase your daily quota. Alibaba Cloud reviews your application and then increases the quota accordingly.
  • You can specify up to 100 URLs to prefetch.
  • The prefetch queue of each Alibaba Cloud account can contain up to 100,000 URLs. DCDN executes prefetch tasks based on the time at which you submit the URLs.
  • You can call this operation up to 15 times per second per account.

Description

  • After a refresh task is submitted and completed, the POPs immediately start to retrieve resources from the origin server. Therefore, a large number of refresh tasks cause a large number of concurrent download tasks. This increases the number of requests that are redirected to the origin server. The back-to-origin routing process consumes more bandwidth resources and the origin server may be overwhelmed.
  • The time required for a prefetch task to complete is proportional to the size of the prefetched file. In actual practice, most prefetch tasks require 5 to 30 minutes to complete. A task with a smaller average file size requires less time.
  • To allow RAM users to perform this operation, you need to first grant them the required permissions. For more information, see Authorize a RAM user to prefetch and refresh resources.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dcdn:PreloadDcdnObjectCachesWRITE
  • domain
    acs:dcdn:*:{#accountId}:domain/{#domainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ObjectPathstringYes

The path of the content that you want to prefetch. Separate multiple URLs with line feed characters (\n) or a pair of carriage return and line feed characters (\r\n).

example.com/examplefile.txt
AreastringNo

The acceleration region in which you want to prefetch content. If you do not specify a region, the value overseas is used.

  • domestic: Chinese mainland
  • overseas: outside the Chinese mainland
domestic
L2PreloadbooleanNo

Specifies whether to prefetch content to POPs. Valid values:

  • true: prefetches content to nodes that include L2 DCDN nodes.
  • false: prefetches content to L2 POPs or L3 POPs.
true
WithHeaderstringNo

The custom header for prefetch in the JSON format.

{ "Accept-Encoding": [ "gzip" ] }

Response parameters

ParameterTypeDescriptionExample
object
PreloadTaskIdstring

The ID of the prefetch task. Multiple IDs are separated by commas (,).

95248880
RequestIdstring

The ID of the request.

E5BD4B50-7A02-493A-AE0B-97B9024B4135

Examples

Sample success responses

JSONformat

{
  "PreloadTaskId": "95248880",
  "RequestId": "E5BD4B50-7A02-493A-AE0B-97B9024B4135"
}

Error codes

HTTP status codeError codeError messageDescription
400SingleRequest.OverLimitA maximum of 1000 URLs are supported for each request.-
400QuotaExceeded.PreloadYour refresh attempts have exceeded the daily limit.The maximum number of refresh and prefetch requests on the current day has been reached.
400InvalidObjectPath.MalformedThe specified ObjectPath is invalid.The ObjectPath parameter is set to an invalid value. Specify a valid value and try again.
400InvalidExtensiveDomain.ValueNotSupportedThe specified ExtensiveDomain is not supported.Wildcard domain names are not supported.
400PreloadQueueFullThe warming queue is full; please try again later.The maximum number of URLs of the objects that are being prefetched has been reached. Try again later.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400