10. Dynamic Content Transformation

The Dynamic Content Transformation (DCT) feature allows the customer’s origin server to serve a single variant of an object, either ‘identity’ or ‘gzip’, and have the CTL CDN dynamically transform that content into the desired variant. The conversion is performed by the CTL CDN parent layer. Subsequent layers of the CDN cache the different variants for delivery to the client based on Accept-Encoding: preferences. The DCT feature can be controlled by the user (on/off) at various levels of the CDN configuration. In addition, the customer can control which variants can be created/supported. Finally, the CTL CDN is able to determine which variant the customer’s origin supports and dynamically create the other variants as needed.

The DCT feature is designed to support the following use cases:

UC1: Origin Supports Single Variant

In this case, the customer’s origin server only supports a single variant of an object, such as identity or gzip. The CTL CDN in turn fills the native variant and is responsible for creating the desired variants based on the client’s capabilities and the allowed formats. The CTL CDN automatically fills the supported variant without having to be provisioned with such knowledge.

UC2: Trigger DCT Based on File Extension

In this case, the customer wants to specify or limit which objects are subject to the DCT feature by defining explicit file extensions to be matched against the client request. The file extension can be either an exclude (DCT is disabled for all file types listed; for all others, it is enabled) or include (DCT is enabled for all file types listed; for all others, it is disabled).

10.1. File Extension DCT

Configuration Definition: Subscriber
Configuration Application: Match Rule (Property)
Default Behavior: Off/Disabled
Limitations: DCT is NOT compatible with large objects
Version: 18.8

The Dynamic Content Transformation (DCT) feature transforms content from a customer’s origin server into either ‘identify’ (if served by the origin as gzip) or ‘gzip’ (if served by the origin as identity). The feature is triggered by the file extension included in the object request. The feature allows for customization of the file extension list based on customer needs. (If mime-type support is required, contact CDN Support for custom configuration options.)

Multiple DCT definitions can exist, but a property can only have a single DCT definition that applies to all requests under that property.

To define a DCT policy:

  1. Create a DCT definition that identifies the file extensions you want to apply content transformation against.
  2. Create a match rule definition that references the DCT defined in step 1.

The DCT definition is defined at the subscriber level and can be used by any property under that subscriber. A DCT definition includes a comma-separated list of file extensions, a name and an ID. The name is used for reference by the match rule definition. The ID is an internal reference that, once set, cannot be changed. Following is a sample DCT definition using the JSON schema:

"dctDefinitions": [
  {
   "name": "DCT-1",
   "id": 594680,
    "fileExtensions": [
      "m3u8",
      "mpd"
    ],
    "isDefault": false
  }

Attributes of a dctDefinition are:

  • name: human-readable name given for DCT definition, unique within a single subscriber. Required.
  • id: unique static identifier for a DCT definition. Integer, Required.
  • fileExtensions: comma-separated list of file extensions that DCT should be applied to. Required.
  • isDefault: if set to True, the DCT definition applies to all requests under the subscriber (regardless of what property they are under) without requiring a match rule. At most one DCT definition can be set to True. All others must be set to False. A default DCT definition can be overridden via a property-level match rule.

A DCT definition by itself does nothing (unless it is a default definition as described above). To enable the feature, the DCT definition must be applied to a property-level match rule (within the subscriber service image). Property-level match rules are contained under the special match group id=0 and have en expression $id.minor == <coserverid>. Following is a sample DCT policy using the JSON schema:

"matchGroups": [
  {
    "id": 0,
    "matchRules": [
      {
        "id": 59468,
        "expression": "$id.minor == 59468",
        "features": {
          "dct": {
            "value": {
              "id": 594680
            }
          }
        }
      }
    ]
  }
]

If the match rule has both AE-override and DCT definitions and the list of file extensions overlap, then the system takes the overlapping extensions out of the AE-override, keeping the rest of them with the encodings defined. The overlapping extensions are presented in the platform config with default DCT encoding of gzip/identity.

10.2. Mime-Based DCT

This feature is not yet supported.