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

Background information

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

Important
  • Make sure that the origin server supports HTTP requests that contain the Range header field, and the origin server can respond to requests with the 206 HTTP status code.
  • Object chunking is optional. By default, this feature is enabled in the ApsaraVideo VOD console.

Procedure

  1. Log on to the ApsaraVideo VOD console.
  2. In the left-side navigation pane, click Configuration Management.
  3. On the Domain Names page, select the domain name that you want to configure, and click Configure in the Actions column.
  4. Click the Video Related tab. Then, click Modify in the Back-to-origin of Range section.
    Object chunking
  5. Select Enable for the Back-to-origin of Range parameter and click OK.
    Enable object chunking
    OptionDescriptionExample
    EnableIf you want the origin server to return only the specified chunks of files, you can select this option to enable object chunking. This way, the response time is reduced. After you enable object chunking, the origin server determines file chunks to be returned based on the Range header field in the request. The CDN node also returns the file chunks 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 contains 101 bytes to the CDN node based on the Range header field. Then, the CDN node returns the file chunk to the client.
    CloseIf you want the origin server to return all content in a requested file to clients, select this option to disable object chunking. After you disable object chunking, a CDN node retrieves a complete file from the origin server. The HTTP connection between the client and the CDN node automatically closes when the client receives the file chunk that is specified in the Range header field. As a result, the file is not cached on the CDN node. This decreases the cache hit ratio and increases 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 a complete file to the CDN node. The CDN node returns only the specified 101 bytes to the client. Then, the CDN node is disconnected from the client. As a result, the file is not cached on the CDN node.
    ForceIf Back-to-origin of Range is set to Force, CDN nodes redirect requests of a client to the origin server with the Range header field retained, regardless of whether the requests contain the Range header field. All files returned from the origin server to CDN nodes are split into chunks of 512 KB. 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.