Over a million developers have joined DZone.

Building a Private Content Delivery Network for Video with Off-the-Shelf Components

DZone's Guide to

Building a Private Content Delivery Network for Video with Off-the-Shelf Components

Ensure your CDN is able to scale to meet demand.

· Cloud Zone ·
Free Resource

Learn how to migrate and modernize stateless applications and run them in a Kubernetes cluster.

The following was shared with us by Pete Mastin, Product Evangelist, Cedexis.

Streaming video has long been the site of third-party commercial content delivery networks (CDNs). However, when a streaming service starts producing a great deal of traffic, even the healthiest CDN can’t stop the feared buffering or slow video startup times.

When an enormous CDN serves hordes of content providers, all of the segments required to offer a full video will never get into the cache. Perfect streaming video requires state-of-the-art content delivery. As Netflix and others have discovered, the greatest, most cost-effective path to high-performance video service is with a network of private hosting solutions and clouds that essentially act like a private CDN. 

However, until recently, a do-it-yourself CDN would have been too complex, begging for outsourcing to a commercial CDN. If you’ve been in the industry as long as I have, you know that building your own streaming CDN was a $100 million problem ten years ago. Nevertheless, new software packages, open source solutions and newer services now make this dream a reality as it is now possible to assemble a private CDN solution with off-the-shelf products.

When a Third Party Won’t Do

A commercial CDN is a tremendously powerful tool for delivering easily cached objects to geographically diverse consumers. Nevertheless, it is important to understand that they are not the last word in all content delivery.

As a multi-tenant service, they do not always fit the requirements for every enterprise - especially long tail content. The way CDNs are priced, they are often cost prohibitive for companies that target specific geographies. For certain delivery types, such as streaming media, they repeatedly are not the correct fit. If a video expires from the CDN’s cache, a cache miss can be expensive, cause delays and trigger buffering for the end client.

Viewer abandonment spikes as delays and buffering increase—80 percent of viewers abandon Internet videos the minute they start buffering. Eliminating these bandwidth and speed issues improve the quality of experience (QoE) and help keep viewers glued to your video.

Video-on-demand (VoD) uses lots of bandwidth to serve content. Digital videos aren’t small, and with video quality increasing, they will only get bigger. Each gigabyte of throughput costs more when it’s managed by a shared CDN service. A private CDN pays for raw connectivity without the overhead of a third-party CDN. This reduces the cost of bandwidth significantly.

Building and Deploying a Private CDN

Understanding components, such as online video streaming and performance-based routing, is vital to creating a private CDN. Let’s take a look at an outline for a project plan to build and deploy one.

1. Gathering Your Tools: Video Content Management

When preparing to stream video, understanding the source is key. Video content publishers might provide products via DVD, BlueRay, or digital media files in dozens of different formats. Live-video capture devices can output media in different bitrates and formats as well. All of this needs to be processed into an adaptive bitrate format for online video streaming.

2. Deploying POPs: Building the Bare Metal

Without origin servers, you won’t get very far. Bare metal is the best option for starting out. Owning the hardware means that you won’t be sharing the most basic resources with noisy neighbors or abstracted virtual machines.

3. Delivering Content: Unified Streaming

Unified Origin from Unified Streaming is deployed on each of your origin servers. It is a software plug-in for industry-standard webservers such as Apache, Nginx, Microsoft IIS and Lighttpd. Origin will ingest the already-packaged video content created in step 2 and repackage it on the fly into the correct format for the client device.

4. Packaging and Digital Rights Management

Depending on licensing, digital rights management (DRM) is an issue that needs to be addressed during content delivery. Videos are protected with DRM keys using a tool such as Unified Origin, which applies DRM at delivery time.

5. Route Users to the Best Video Origin

Now that you have deployed servers, packaged video, and implemented a streaming solution, you have to connect your users to the best possible origin server. Look for a proven solution, with an immense collection of metrics, to figure out which origin is the best for each viewer—even midstream.

6. Expanding Your Service: Repeat as Needed

Finally, as your number of viewers expands, more POPs will be needed. You’ll need a solution with powerful analytics to help you figure out where your next POP should be deployed.

Building a Platform for Growth 

Growth does not need to be a guessing game. As a VoD service takes off and traffic expands globally, new geographic markets create new performance challenges. This means a VoD service needs to expand into new private data centers to handle additional traffic from new sources. 

A private VoD CDN requires intelligent routing, efficient video delivery, and an eye for network performance detail. The result is a highly customized video delivery system with the best performance for each customer base.

A private CDN is not for everyone. In many cases, deploying two or more commercial CDNs is completely adequate. It really depends on the use case.  Content licensed for specific locations, and delivered to known users within those boundaries, often does not require a commercial CDN. In these cases building private purpose built infrastructure can allow a business to scale in a cost effective manner.

About the Author

As a Product Evangelest at Cedexis, Pete Mastin has expert knowledge of content delivery networks (CDN), IP services, online gaming, and Internet and cloud technologies. 


Join us in exploring application and infrastructure changes required for running scalable, observable, and portable apps on Kubernetes.

content delivery networks ,video on demand ,digital rights management ,private CDN

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}