Skip to content

Range Back-to-Origin Configuration

Configuration Scenario

When Cloud Protection caches resources, it slices files for storage efficiency and supports Range requests. If a request includes the HTTP header Range: bytes = 0-999, the first 1000 bytes of the file will be returned to the user.

Enabling Range back-to-origin configuration allows CDN to fetch only the required file segments from the origin when the cached partial file has expired. These segments are then cached and returned to the user. Disabling this feature means CDN will fetch the entire file from the origin, cache it, and respond with the requested portion, even if the user asks for only a part of the file.

Enabling Range back-to-origin improves the efficiency of large file distribution, accelerates response times, and reduces origin server load.

Note:

When Range back-to-origin is enabled, resources are cached in segments on the nodes. However, all segments share the same cache expiration time, determined by the user-specified caching rules.

Configuration Guide

View Configuration

Log in to the Cloud Protection console, navigate to ​​Domain Management​​, and click ​​Manage​​ next to the domain name. On the domain configuration page, locate ​​Back-to-Origin Configuration​​ in the third section. The Range back-to-origin configuration is displayed here and is disabled by default.

img

Modify Configuration

Toggle the switch to enable or disable Range back-to-origin. Before enabling, ensure the origin server supports Range requests; otherwise, back-to-origin requests may fail.

Configuration Example

For the domain www.test.com with Range back-to-origin enabled:

  • User A requests: http://www.test.com/test.apk. The node detects the cached test.apk file has expired and initiates a back-to-origin request using Range to fetch and cache the required segments.
  • If User B also sends a Range request, the node will directly return the cached segments that match the specified byte range, without waiting for all segments to be fetched.