All Products
Search
Document Center

Edge Security Acceleration:Range request

Last Updated:Dec 30, 2024

Range request refers to the origin request that includes range information. When the origin server receives a range request, it returns the specified range of content to Edge Security Acceleration (ESA) point of presence (POP) based on the range information in the HTTP request header. Range requests can improve file distribution efficiency, increase cache hit ratio, reduce origin traffic, and enhance resource response speed.

How it works

The range header is an HTTP request header used to specify the range of content to be retrieved. For example, Range: bytes=0-100 indicates that the request fetches the first 101 bytes of the file from the origin.

After enabling the range request feature, when ESA receives a user's request, the POP will send range requests to the origin server if the resource is not cached or has expired. This retrieves the required segments of the resource and caches them at the ESA POP.

The following diagram shows how range requests work:

image

Prerequisites

Ensure that the origin server supports range requests, meaning it can respond to the HTTP request header containing the range field with a 206 status code.

If the origin server does not support range requests, enabling the feature will result in resources not being cached.

Procedure

  1. Log on to the ESA console.

  2. In the left-side navigation pane, click Websites.

  3. On the Websites page, find the website that you want to manage, and click the website name or View Details in the Actions column.

  4. In the left-side navigation pane, choose Rules > Origin Rules.

  5. Click Create Rule and fill in the Rule Name.

  6. In the If requests match... section, configure the user request characteristics to be matched. Click Configure in the Range Requests area.

  7. Select Match Client (Default), Disable or Enable (Recommended If Large Files requested).

    Option

    Description

    Example

    Match Client (Default)

    The ESA POP sends range requests to the origin server only when the client initiates a range request to the POP. The initial fetch will round up to the range size specified in the user's request, while all subsequent requests will use a sharding size of 512 KB.

    If the client's request to the ESA POP specifies range:0-100, the POP will initiate a request to the origin server with a sharding size of 512 KB. After the origin server responds with the 512 KB of content, the ESA POP will cache the shard and respond to the client with the content for range:0-100.

    Disable

    Regardless of whether the client uses range requests, the ESA POP will request the entire file from the origin server, resulting in lower file distribution efficiency for large files.

    Even if the client's request to the ESA POP contains range:0-100, the POP request to the origin server will not carry the range parameter. The origin server will respond with the complete file to the ESA POP. After receiving the file from the origin server, the ESA POP will cache the file and respond to the client with the content for range:0-100.

    Enable (Recommended If Large Files requested)

    Regardless of whether the client uses range requests, the ESA POP will send range requests to the origin. All range requests will use a 512 KB sharding size.

    None

  8. Click OK to save your settings.