Virtual Channel with Cloudfront CDN

How to configure Cloudfront as a CDN for Virtual Channel services

In Using broadpeak.io with a CDN we explain the reasons why you need to use a CDN in front of your broadpeak.io services in order to deliver your manipulated streams in the most optimal and efficient way.

In this playbook, we'll look at a couple of examples and illustrate how to configure it with the AWS Cloudfront product, for a Virtual Channel application.

Prerequisites

You need to be familiar with how to configure a broadpeak.io Virtual Channel service first. You'll find other playbooks in the "Getting Started" section of our documentation, as well as in the present "Playbooks" section.

For expediency, the examples in this playbook will use the same sources as those Getting Started articles.

Rules

The primary aspect of configuration for the CDN relates to routing. In an ABR stream, there are one or multiple manifests or playlists, and multiple media segments that the player will request in order to render the stream. The player connects to a single CDN, which needs to know where to send those requests. So it needs to be given a set of rules to follow. Those rules will be somewhat dependent on the type of service you are implementing.

For a Virtual Channel service, you will need:

  • Rules that define how to direct manifest requests to broadpeak.io
  • Rules that define how to direct segment calls for the base live stream to its origin (ie. the server that stores that original packaged content)
  • One or more rules to direct segment calls for the replacement assets to their respective origins.

There rules are the exact same ones as for a Content Replacement service, and are explained in detail at Content Replacement with Cloudfront CDN

If you use the Ad Insertion feature with your Virtual Channel, you will also need rules specific to redirection of requests for ad segments. Those are described in detail at Dynamic Ad Insertion with Cloudfront CDN