Object chunking can reduce the response time of the requests for resources and the amount of back-to-origin traffic. This topic describes how to configure object chunking.

Precautions

The object chunking feature enables the origin server to return only the specified file chunks to clients. This feature facilitates the delivery of large audio and video files.

When you configure object chunking, take note of the following points:
  • Before you configure object chunking, make sure that the origin server supports HTTP requests that contain the Range field. In addition, the origin server must be able to properly return the HTTP 206 Partial Content status code to requests.
  • Object chunking is optional. In the Alibaba Cloud CDN console, this feature is disabled by default.
  1. Log on to the ApsaraVideo VOD console.
  2. In the left-side navigation pane, click Configuration Management.
  3. Choose CDN Configuration > Domain Names.
  4. On the Domain Names page, select the domain name that you want to configure, and click Configure in the Actions column.
    Click Configure
  5. Click the Video Related tab. Then, click Modify in the Back-to-origin of Range section.
    Note The Enable option is selected by default.
    Object chunking
  6. Set the Back-to-origin of Range parameter and click OK.
    Enable object chunking
    Range Configuration Description Example
    Enable If you want to access the specified chunk of a file, you can select this option to enable object chunking to improve response efficiency. After you enable object chunking, the origin server determines the file chunks to be returned based on the Range header field in the request. The Content Delivery Network (CDN) node also returns the file chunks that are determined by the origin server to the client. If a client sends a request that contains range:0-100 to a CDN node, the request is redirected to the origin server with range:0-100 retained. The origin server returns a file chunk that includes 101 bytes in the range of 0 to 100 to the CDN node. Then, the CDN node returns the file chunk to the client.
    Close If you want to access all the content of a file, select this option to disable object chunking. After you disable object chunking, CDN nodes retrieve complete files from the origin server. The HTTP connection between the client and a CDN node automatically closes when the client receives the file chunk that is specified in the Range header field. As a result, the complete file is not cached on the CDN node. This may decrease the cache hit ratio and increase the back-to-origin traffic. If a client sends a request that contains range:0-100 to a CDN node, the request is redirected to the origin server with range:0-100 ignored. The origin server returns the complete file to the CDN node. The CDN node returns only the specified 101 bytes to the client. After that, the CDN node is disconnected from the client. As a result, the complete file is not cached on the CDN node.
    Force Select this option to redirect all requests that contain the Range header field to the origin server. Before you set the Back-to-origin of Range parameter to Force, make sure that the origin server supports the Range header field.
    Note After you set the Back-to-origin of Range parameter to Force, all chunked requests are forcibly sent to the origin server.