All Products
Search
Document Center

CDN:Configure range origin fetch

Last Updated:Apr 24, 2026

Range origin fetch enables a point of presence (POP) to include a Range header in its request to an origin server. When the origin server receives the request from the POP, it returns only the specified portion of the resource. This method improves file delivery efficiency, reduces back-to-origin traffic and the load on your origin server, and speeds up response times.

Background

The Range header in an HTTP request specifies which part of a resource to retrieve. For example, a request with the header Range: bytes=0-100 asks for the first 101 bytes of a file.

After you enable the range origin fetch feature, when a receives a user request, if the resource is not cached on the POP or has expired, the POP performs an origin fetch by using a Range request. This allows the POP to retrieve only the required part of the resource from the origin server in segments and cache it on the POP.

This diagram illustrates how range origin fetch works.

image

Usage notes

Before you enable range origin fetch, consider the following:

  • Before you enable range origin fetch, make sure your origin server supports Range requests. The origin server must be able to process the Range header and respond with a 206 Partial Content status. If your origin server does not support Range requests, enabling this feature may cause caching issues or client request failures.

  • Range origin fetch is an optional feature and is disabled by default in the console.

  • The Multipart Ranges feature is disabled by default. Enabling range origin fetch does not automatically enable Multipart Ranges. To enable this feature, submit a ticket.

  • Enabling range origin fetch increases the QPS of origin fetches, which may trigger rate limiting on your origin server. To work around this issue, call the DescribeL2VipsByDomain operation to retrieve the IP addresses of origin-pull POPs, and add the IP addresses of the origin-pull POPs to the IP address allowlist of your origin server.

Procedure

  1. Log on to the CDN console.

  2. In the left navigation pane, click Domain Names.

  3. On the Domain Names page, find the target domain name and click Manage in the Actions column.

  4. In the domain's navigation pane, click Video.

  5. In the Range Origin Fetch section, click Modify.

  6. Based on the parameter descriptions in the following table, select Do Not Enable Range Origin Fetch, Match Client, or Enable Range Origin Fetch (Recommended for Large File Delivery).

    If you select Match Client or Enable Range Origin Fetch (Recommended for Large File Delivery), you can set the shard size. The default shard size is 512 KB.

    Parameter

    Option

    Description

    Example

    Range Origin Fetch

    Do Not Enable Range Origin Fetch

    By default, Do Not Enable Range Origin Fetch is selected, which means that regardless of whether a client sends a Range request to a CDN POP, the CDN POP requests the entire file during an origin fetch, resulting in low file distribution efficiency for large files.

    For example, if a request from a client to a CDN POP contains Range: bytes=0-100, the CDN POP sends a request to the origin server without the Range parameter. The origin server sends the entire file to the CDN POP. For example, if the file is 10 MB, the origin server sends the 10 MB file to the CDN POP. The CDN POP caches the file that it receives from the origin server and then responds to the client with the content for the Range: bytes=0-100 request.

    Match Client

    After you enable Match Client, if a client sends a Range request to a CDN POP, the CDN POP performs an origin fetch by using a Range request. For the first origin fetch request, the CDN POP requests a data block from your origin server. The size of this block is determined by rounding up the range size from the client's request to the nearest integer multiple of the shard size. All subsequent origin fetch requests use the shard size that you specify.

    For example, when the shard size is 512 KB, if a client sends a request to a CDN POP that contains Range:bytes=0-614399 (which is 600 KB), and the file is not cached on the CDN POP, the first origin fetch retrieves a 1024 KB shard (600 KB rounded up to 1024 KB). For subsequent requests for other uncached shards of the file, the CDN POP accesses the origin server by using a shard size of 512 KB.

    Enable Range Origin Fetch (Recommended for Large File Delivery)

    After Enable Range Origin Fetch (Recommended for Large File Delivery) is enabled, regardless of whether a client sends a Range request to a CDN POP, CDN POPs always use Range requests for origin fetch. All Range requests sent from CDN POPs to the origin server use the shard size that you specify.

    None

    Shard Size

    • 512 KB

    • 1 MB

    • 2 MB

    • 4 MB

    You can set the shard size if you select Match Client or Enable Range Origin Fetch (Recommended for Large File Delivery). The default size is 512 KB.

    1 MB

    Rule Condition

    A rule condition determines whether a configuration applies to a request by evaluating various parameters in the request.

    Important

    When a feature references rule conditions configured in the rules engine, the execution order follows the priority of the associated rule conditions, not the order of the feature configurations.

    • Do not use conditions: Disables conditional rules.

    • You can add or edit conditional rules in Rules engine.

    A rule condition evaluates parameters in a user request to determine whether the configuration applies.

    Do not use

  7. Click OK to save the configuration.