Range Requests
A range request allows the origin server to send data of a specific range to a CDN PoP based on the range information in the HTTP request header.
Background
- Range information specifies the positions of the first and last bytes for the data to be returned. For example, Range: bytes=0-100 indicates that the first 101 bytes of the file are required.
- If this function is enabled, when a client requests a resource that is not cached or has expired, CDN PoPs initiate a range request to pull the required resource from the origin server by segment and cache the resource.
- Range requests shorten the distribution time of large files, improve origin pull efficiency, and reduce resource consumption.
Precautions
- To enable range requests for origin pull, the origin server must support range requests, that is, requests with the Range field in the headers. Otherwise, origin pull may fail.
- Domain names whose service type is whole site acceleration do not support this function.
- By default, range requests are enabled for file download acceleration and on-demand service acceleration.
- If an origin server resource exceeds 1 GB and range requests are not enabled, origin pull for such resource will fail.
Procedure
- Log in to Huawei Cloud console. Choose .
The CDN console is displayed.
- In the navigation pane, choose .
- In the domain list, click the target domain name or click Configure in the Operation column.
- Click the Origin Settings tab.
- In the Range Requests area, switch on or off Range Requests based on service requirements.
Figure 1 Range requests
Example
Assume that you have enabled range requests for domain name www.example.com.
- If user A requests www.example.com/cdn.mp4, and CDN PoPs do not cache the content or the cached content on the CDN PoPs has expired, the optimal CDN PoP initiates a range request to pull ranges of the content from the origin server. Ranges of the content are then cached on the PoP.
- When user A's requested content is being cached, if user B sends a range request to this PoP, and the cache on the PoP already contains the range of the content requested by user B, the PoP immediately returns the requested range.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot