An end user's media player understands playback behavior better than a content delivery network (CDN) can from its limited server-side data. So, we offer support for Common Media Client Data (CMCD). This is an open specification created by the Consumer Technology Association. A media player can use it to send its expanded playback information to Akamai (and other CDNs). You can use it for multiple purposes:
- Data can be used for segment prefetching. Your media player can include prefetching "hints" in CMCD metadata. This is supported for content that's segmented into individual objects, as well as byte ranges for prefetching parts of much larger media objects.
- Data is stored in logs for troubleshooting. More data = more help fixing problems Akamai customer support can quickly access this log data to help reduce troubleshooting time.
There are a few things you need to do to enable support for CMCD.
You'll want to set up your media player to send CMCD data from a requesting client. Data can be sent to Akamai using either of these methods:
As a custom HTTP request header.
As an HTTP query argument.
Guidelines are laid out in the CMCD specification. Look to it for the latest recommendations on transmitting information in your requests.
A single request shouldn't include both CMCD headers and query arguments. If one does, Akamai ignores the query argument.
If you'd like to support segment prefetching, the CMCD data sent by your player needs to include at least these keys:
Buffer length (
This is the buffer length for your player. AMD uses
Next object request (
One of these keys needs to be included, based on how your player is requesting your segmented content:
See the CMCD specification for proper instructions on including these values in a request from your player.
A CORS-restricted client (such as a web application running inside a browser) has to make a preflight OPTIONS request against a CDN before it can request an object that includes custom CMCD headers. So, the HTTP query argument method is recommended for browser clients, while the custom HTTP request header method is recommended for all other clients.
Make sure your property is set up to receive CMCD data, based on how the client is sending it.
You can incorporate support for CMCD headers in multiple ways.
Create a new Akamai property
If this is a new property, support for CMCD is automatically added to the Default CORS Policy Rule. The
Create a new version of an existing Akamai property
If the property contains the Modify Outgoing Response Header behavior, either standalone or as part of the Default CORS Policy Rule, Akamai will automatically add the
Add a separate instance of the Modify Outgoing Response Header behavior
If you're not employing the Default CORS Policy rule, you can include the Modify Outgoing Response Header behavior in another rule. If this is the case, this behavior's settings need to be set as follows:
If you’d prefer to use query arguments, you need to do a couple of things.
Set the Cache Key Query Parameters behavior
You need to be sure that CMCD query arguments are not cached. CMCD data changes with each request. Caching these arguments will increase the load on your origin server and affect performance. Make sure that the Cache Key Query Parameters behavior in your delivery property is set up using either of these methods:
Avoid CMCD headers
Ensure that requests from the player don't include CMCD headers, because they'll take precedence.
If you want to include this support, add the Common Media Client Data support behavior to your AMD property and set it to "On."
You need to add the behavior to the same rule tree where you configured other settings for CMCD support:
The same rule. Its match criterion needs to be met in a request to apply all of the CMCD-specific settings you defined.
A child rule. The parent-level rule contains settings to apply CMCD support via headers or query strings. The child rule can be set to have its own unique match criterion so that only those requests apply segment prefetching.
Ensure your player supports CMCD and thoroughly test your configuration on the staging network. Verify interactions between your player and origin server before fully enabling your property on the production network.
Review these points before adding CMCD to your property:
CMCD prefetching takes precedence
If you've set up Origin-assist prefetch, CMCD prefetching will override it.
CMCD prefetching may significantly increase log sizes
Log entries can increase from 300 bytes in size, up to 512. Take this into consideration when gathering and storing log data. For example, if you're using Akamai's Log Delivery Service and externally storing logs.
Requests for large
If your player is requesting segmented content using
Custom prefetch solutions may create issues
If you have a custom solution in place, for example, through advanced metadata, and you apply CMCD prefetching, this can lead to duplicate prefetch requests. This can create a higher load on your origin and slow delivery. Talk to your Akamai account team if you have a custom configuration.
CMCD prefetches can amplify a DOS attack
This can happen if prefetching inadvertently triggers a prefetch of a much larger object. For example, if a proper range isn't specified, a byte range request could request a full VOD asset that's supposed to be segmented. Make sure your player is properly requesting byte ranges to avoid this.
CMCD prefetching isn't supported with Media Encryption for DASH
Akamai only supports a subset of CMCD keys
These keys can be included in a request, but they'll be ignored:
Updated 4 months ago