Automatic CDN switching
Many customers choose to follow a multi-CDN strategy. Switching to the optimal CDN (content delivery network) in real time can be done a number of ways; here is just one approach leveraging two of the bitmovin products:
- the Bitmovin ANALYTICS module for real-time QoS, and
- the Bitmovin PLAYER logic to adjust the source.
Note: this guide assumes you serve your webpage/app via a webCMS, a fairly normal practice.
Step 1: Setting a threshold trigger in analytics
In this example the median video startup time is acting as the trigger for CDN change. If the analytics tool identifies a prolonged threshold breach then a webhook is fired.
Step 2: Modifying the source URL
Functionality inside your webCMS should allow for a variable change upon receiving a webhook. In this case the variable would normally contain the URL-prefix associated with CDN-A (primary content deliver network); changing to CDN-B (backup content delivery network) upon receiving webhook.
Step 3: Playing based on a variable
The Bitmovin player requires a sourceURL pointing at where to find the video manifest, normally injected by the webCMS. In this example the sourceURL would be formed by concatenating the CDN variable with the URL's ending allowing the platform to swing CDN as network conditions dictate.
CDN-A = https://myCDN.x/ CDN-B = https://otherCDN.x/ URL ending = 1234/manifest.m3u8?.. source = https://myCDN.x/1234/manifest.m3u8?.. <> https://otherCDN.x/1234/manifest.m3u8?..
Note: This example is over-simplified; logic will be needed to swing back to CDN-A; and potentially trigger on more than just the video startup time metric, but it shows how analytics thresholds might be used for both for alerting and proactive maintenance.
Updated about 2 months ago