Increase global streaming availability with HLS Content Steering
Highlight
HLS Content Steering establishes a bypass channel with the player through the steering server, and the content provider can update the CDN priority policy in real time. When the Chinese CDN is overloaded, the steering server can instruct 30% of existing clients to switch to the Japanese CDN without regenerating the playlist.
Core Content
Global streaming distribution faces two core availability challenges: network congestion mitigation and failure recovery. In traditional scenarios, CDN priorities are hard-coded in the master playlist and cannot be changed once published. When a CDN is overloaded or down, existing clients continue to send requests to it, leaving the content provider helpless.
HLS Content Steering allows players to regularly pull CDN priority updates by embedding the steering server address in the master playlist. Content providers can adjust traffic distribution, perform load balancing, and respond to network failures in real time—all decisions are made on the server side, and the client only needs to follow the priority list in the steering manifest.
Detailed Content
Limitations of traditional solutions
Variant streams for multiple CDNs listed in the master playlist (04:45):
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=1280000,...
https://cdn-cn.example.com/video/low.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2560000,...
https://cdn-cn.example.com/video/mid.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1280000,...
https://cdn-jp.example.com/video/low.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2560000,...
https://cdn-jp.example.com/video/mid.m3u8
The playlist priority of this scheme is fixed. Content providers cannot change the CDN ordering during playback, nor can existing clients be directed to a different CDN.
Enable Content Steering
Add to master playlistEXT-X-CONTENT-STEERINGTags (05:03):
#EXTM3U
#EXT-X-CONTENT-STEERING:SERVER-URI="/steering?video=abc",PATHWAY-ID="CN"
#EXT-X-STREAM-INF:BANDWIDTH=1280000,PATHWAY-ID="CN"
https://cdn-cn.example.com/video/low.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2560000,PATHWAY-ID="CN"
https://cdn-cn.example.com/video/mid.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1280000,PATHWAY-ID="JP"
https://cdn-jp.example.com/video/low.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2560000,PATHWAY-ID="JP"
https://cdn-jp.example.com/video/mid.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1280000,PATHWAY-ID="SG"
https://cdn-sg.example.com/video/low.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2560000,PATHWAY-ID="SG"
https://cdn-sg.example.com/video/mid.m3u8
Key attributes:
| Properties | Function |
|---|---|
SERVER-URI | The address of the steering server. The client periodically pulls updates from this URI |
PATHWAY-ID | Define the path to which the variant flow belongs, each path usually corresponds to a CDN |
PATHWAY-ID(on label) | Specify the initial path when playback starts |
Variants flow throughPATHWAY-IDGroup. After the client selects a path, it only selects the code rate from the variant streams of this path.
Playlist with media group
If the playlist contains media groups (such as multiple tracks), copy the media groups for each path and assign a unique GROUP-ID (06:28):
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="CN-audio",NAME="English",URI="..."
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="JP-audio",NAME="English",URI="..."
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="SG-audio",NAME="English",URI="..."
#EXT-X-STREAM-INF:BANDWIDTH=1280000,PATHWAY-ID="CN",AUDIO="CN-audio"
https://cdn-cn.example.com/video/low.m3u8
Steering Manifest Format
The steering server returns the Steering Manifest in JSON format (07:53):
{
"VERSION": 1,
"TTL": 300,
"RELOAD-URI": "/steering?video=abc&session=xyz",
"PATHWAY-PRIORITY": ["CN", "JP", "SG"]
}
| Field | Function |
|---|---|
VERSION | manifest format version |
TTL | The number of seconds the client waits before the next request |
RELOAD-URI | The URI for the next request, which can be injected with client state or session data |
PATHWAY-PRIORITY | Path priority list, the first one has the highest priority |
The steering server can customize the manifest for each client to achieve refined traffic scheduling.
Client behavior
After loading the master playlist with the Content Steering tag, the client executes the following process (06:56):
- Initial Selection: Only from the initial path (
PATHWAY-IDpath specified) is selected from the variant stream - Start playback: Load the selected variant stream and media segment
- Background pull: Send Steering Manifest request to steering server in parallel
- Evaluation switching: After receiving the manifest, exclude variant streams that are penalized due to network errors and unsupported codecs, and select the path with the highest priority and at least one qualified variant stream
- Path switching: If the selected path is different from the current path, switch immediately
- Timed retry: Schedule the next request according to TTL
Network congestion scenario
Assume a Chinese CDN is overloaded by user surge (01:38):
- All Chinese users initially receive the manifest with the highest CN priority.
- The steering server detects that the CN CDN load is too high
- Send the new manifest with the highest JP priority to 30% of Chinese users
- After evaluation, these clients switch to the JP path and the traffic is redirected to Japan CDN
- China CDN load eased
Fault recovery scenario
Assume a regional outage on the network path from Japan to the Japan CDN (02:54):
- Before the failure, Japanese users regularly obtained the priority list from the steering server.
[JP, SG, CN] - After network outage, Japanese CDN is marked as penalized
- The client excludes variant flows of the JP path and selects the next highest priority SG path
- The traffic is automatically switched to Singapore CDN, and the user continues to watch without noticing.
TTL and load distribution
TTL controls how often clients pull (09:42). The steering server can:
- Shorten TTL during congestion or failure, allowing clients to get new policies faster
- Inject random TTL offsets for different clients to spread the load of the steering server
- pass
RELOAD-URICarry session state in the URL to implement stateful scheduling decisions
Core Takeaways
-
Group CDNs with PATHWAY-ID: Each path corresponds to a CDN, and variant flows are grouped by path. The initial path specifies the CDN when playback is started, and is subsequently dynamically adjusted through the steering manifest.
-
steering server implements refined scheduling: a customized priority list can be generated for each client based on the user’s geographical location, CDN real-time load, network conditions and other dimensions.
-
TTL is dynamically adjusted to cope with different scenarios: TTL is set to 300 seconds during normal operation, and shortened to 30-60 seconds when CDN degrades or fails, allowing the client to respond to policy changes faster.
-
RELOAD-URI transfers session status: carries session ID, user area and other information in the URL, and the steering server makes more accurate scheduling decisions based on these states.
-
Backwards compatible with existing clients: Old clients without Content Steering support will be ignored
EXT-X-CONTENT-STEERINGlabel, treating all variant streams as equal options and behaving as before.
Related Sessions
- WWDC2021 10140 - HLS Dynamic Ad Insertion Exploration — Collaboration of HLS Interstitials and Content Steering
- WWDC2021 10187 - Build custom experiences with Group Activities — Streaming media distribution in SharePlay
- WWDC2021 10225 - Use Group Activities to coordinate media experiences — CDN selection for simultaneous playback by multiple people
- WWDC2021 10189 - Group Activities in Safari — Web-side streaming media and CDN scheduling
Comments
GitHub Issues · utterances