Dynamic CDN Switching – Content Steering in dash.js

Content distributors often use multiple Content Delivery Networks (CDNs) to distribute their content to the end-users. They may upload a copy of their catalog to each CDN, or more commonly have all CDNs pull the content from a common origin. Alternate URLs are generated, one for each CDN, that point at identical content. DASH players may access alternate URLs in the event of delivery problems” [1].

Content steering describes a deterministic capability for a content distributor to switch the content source that a player uses either at start-up or midstream, by means of a remote steering service” [1].

Content steering was discussed extensively on the HLS mailing list and officially introduced by Apple during WWDC 2022 as a mechanism to steer HLS clients to different servers based on load and redundancy [2]. The DASH Industry Forum (DASH-IF) has picked up the task to define a DASH specification for content steering that allows content providers to steer HLS and DASH client simultaneously with a single response from a steering server. The basic DASH content steering architecture is depicted in the Figure below.

Content Steering in DASH [1]

Preparing the content

In a basic content steering scenario the content provider offers the DASH media segments via two different CDNs. For that reason, two <BaseURL> elements are defined in the MPD, pointing to the two available CDNS:

<BaseURL serviceLocation="alpha">https://cdn1.example.com/</BaseURL>
<BaseURL serviceLocation="beta">https://cdn2.example.com/</BaseURL>

In addition, a new <ContentSteering> element is introduced and added to the MPD:

<ContentSteering defaultServiceLocation="beta" queryBeforeStart="true">
  https://steeringserver.com>
</ContentSteering>

The defaultServiceLocation attribute points to the serviceLocation of the <BaseURL> element that should be used at playback start. The queryBeforeStart attribute specifies if the player should resolve the response from the steering server before starting the playback. The URL to the steering server is specified within the <ContentSteering> element. Content steering is backwards compatible, clients that do not support the <ContentSteering> element will simply ignore it.

The content steering server

The content steering server is responsible for handling the content steering requests from the DASH clients by returning a steering manifest. The steering manifest is a JSON document with the following key-values pairs:

{
 "VERSION": 1,
 "TTL": 300,
 "RELOAD-URI": "https://steeringservice.com/app/instance12345?session=abc"
 "SERVICE-LOCATION-PRIORITY": ["beta","alpha"]
}

The version value specifies the version of the DASH content steering manifest. TTL defines how many seconds the client should wait before triggering the next request to the steering server. The optional RELOAD-URI holds information about the URI that the client should use the next time it requests the steering manifest. The SERVICE-LOCATION-PRIORITY defines the serviceLocation priorities in descending order. In the example above, the BaseURL element with serviceLocation set to "beta" (corresponding to CDN2) is supposed to be used by the DASH Clients in favor of the other available CDN.

dash.js implementation

With version 4.5.0 of dash.js we introduce support for DASH content steering. The implementation is already available in the nightly build of the player, the corresponding pull request can be found here. For a demo of content steering in dash.js using a local test setup please checkout the video below:

If you have any question regarding our DASH activities or dash.js in particular, feel free to check out our website and contact us.

After two years of pandemic hiatus, we’re glad to be back at IBC 2022 in person. If you want to see content steering in action and various other streaming related demos visit us at Hall 8 at Booth 8.B80. More information about our IBC 2022 demos can also be found here.

References

[1] DASH-IF CTS Version 0.9.0 – https://dashif.org/docs/DASH-IF-CTS-00XX-Content-Steering-Community-Review.pdf

[2] Deliver reliable streams with HLS Content Steering –https://developer.apple.com/videos/play/wwdc2022/10144/

Leave a Reply

Your email address will not be published. Required fields are marked *