Back

Is building your own CDN as daunting as it sounds?

Is building your own CDN as daunting as it sounds?

With demand for streaming services soaring globally, the infrastructure demands on successful streaming platforms are mounting. And key to delivering high-quality streams to users all around the world is the content delivery network (CDN).

Using a commercial CDN has traditionally been the obvious choice. But times are changing. Seeking greater control and aided by new open-source tools and containerization, more companies are looking to alternatives in the form of private or hybrid CDNs and multi-vendor approaches combining private and third-party vendors.  

Considering building your own CDN? In this blog post we discuss the reasons why you might want to create your own CDN, the steps required to do so, and some common misconceptions holding businesses back from making the switch.

Why build your own CDN?

Commercial CDNs are a great choice for many. But they do have some drawbacks. They can be costly, you might come up against network filters, and you’ll have minimal control over where your content is hosted. So, in some cases, building your own CDN might be the better choice, for example if…

1. You want to save money and promote growth

Commercial CDNs are usually billed according to bandwidth use and the volume of requests at each point of presence (PoP). For higher levels of traffic, costs can quickly mount to become prohibitive. Costs that can be reduced with a private CDN because you don’t have to conform to the hardware that your vendor has selected and you can choose which ISPs to work with.

“Private CDNs enable significant economies of scale” comments Paul Martin, vice president of marketing and business development at Vecima Networks. Something that’s especially important for large OTT (over-the-top) operators competing to survive in today’s competitive media and entertainment industry.

But despite the positive financial outlook, if you’re seriously considering building your own CDN to reduce costs, remember to do the math. To make sure it’s a sound financial decision you’ll need to factor in operating costs as well as upfront capital.

2. You need PoPs that aren’t available from other vendors

Most commercial CDNs will provide hosting options in a variety of locations but as a customer you won’t have complete control over your points of presence. That means your network can’t be fully optimized to your target audience.

Particularly if your user base is concentrated in regions that commercial CDNs don’t cover well, it may be advantageous (if not necessary) to opt for a self-managed option since you’ll have full control over where your proxy servers are set up.

That’s not to say that commercial content delivery networks don’t have their own advantages. They’re typically easier to set up, come with all the required infrastructure and CDN software included, and offer the security that comes with using a mature, tested, environment. It ultimately comes down to a balance between control, availability, and reliability.

3. You want to avoid network congestion

As the volume of content being transmitted across broadband and mobile networks continues to soar, it’s becoming increasingly important for streaming platforms to find ways to deliver stellar viewing experiences at scale. Downtime and poor viewer experiences are a risk to revenue and reputation.

One reason why some leading OTT platforms like Netflix and Amazon have already chosen to use private CDNs is to avoid congestion and bottlenecks on shared networks that could risk their streams. The same goes for live streaming. Private CDNs can help deal with short-term traffic spikes around popular events.

“Not only can a private CDN overcome the perpetual network congestion points, but it can also be the most cost-effective long-term platform”, comments Martin.

4. You need a bespoke solution

Commercial CDNs may be simple to set up but, in turn, you’ll get a one-size-fits-all approach. On the other hand, a private CDN gives you full control over how you choose to design and deploy your content delivery network. And you won’t have to share your infrastructure with other businesses.

If you’re dealing with a highly specialized type of content - adaptive bitrate video streaming (ABR), for instance – it’s unlikely that your needs will be met fully by a generalized, commercial CDN. In cases like these, a custom-built CDN designed specifically to optimize the delivery of segmented video files will offer better levels of performance and scalability.

These are exactly the thought processes that Charter Communications went through when deciding to build their own content delivery network. Despite working primarily with ABR, the telecommunications and mass media company had been using a commercial CDN for a long time. Charter Communications eventually found commercial solutions to be cost-prohibitive, often coming with redundant features (multi-tenancy, logging etc.), and proving ineffective for non-conformant content like ABR.

“We decided that if we could build it ourselves and we could tailor it for segmented ABR video, we could potentially get better performance, lower cost, better scale, and a lot more control,” said Jamie Panagos, Charter Communications’ Senior Director.

“One of the other ways we came to the decision is: we found that once you start customizing any software enough, at a certain point it becomes more sensible to just build it yourself,” furthers Panagos.

Ultimately, the company decided to build its own ABR video CDN, motivated by four key drivers: cost, control, the ability to turn features off, and unstifled scalability.

4 reasons to build your own CDN

How to build your own CDN

Building your own CDN can sound daunting but with careful planning, it’s eminently achievable. To help you get started, here’s some context. These are the fundamental steps that you’ll need to take when building a content delivery network from scratch.

Step 1: Identify your PoPs

The very first step when building a CDN is to identify your key PoPs and the best geographical locations for your origin servers. Origin servers should be located as close to you as possible. That way you have full control over your web server. But when it comes to your PoPs, you’ll need to weigh up factors such as audience locations, anticipated growth in particular regions, and traffic patterns.  

Step 2: Choose your infrastructure set up

You’ll need to decide whether to host your CDN (both origin servers and PoPs) using virtualized machines, bare metal, or a combination of both.

To make this decision you’ll need to consider factors such as security, scalability, cost, performance, and availability. A hybrid infrastructure approach with a portion of the CDN implemented on bare metal and another portion implemented on cloud can offer the best of both worlds. You’ll be able to access a wider pool of data centers across different regions, keep costs sustainable, and combine the instant scalability of cloud with the strength and security of bare metal machines.

It's also worth implementing a DNS server with geoDNS to route client requests more efficiently. GeoDNS will route individual client IP addresses to your closest CDN server. You can build this yourself or choose from various pre-made solutions.

Step 3: Identify your concurrent viewership and prepare for spikes

To ensure that your users enjoy quality streams, it’s important to evaluate your typical levels of concurrent viewership and factor in contingency for demand spikes. In the streaming world, demand spikes are inevitable around popular events (think sporting events like the SuperBowl, for instance).

Step 4: Evaluate redundancy and plan for disaster scenarios

To avoid downtime or interrupted services, it’s important to build redundancy into your infrastructure stack so that your servers don’t become overloaded. Ways to improve redundancy within your CDN include implementing RAID at the server level, backing up data on backup servers or storage devices, placing additional points of presence across physically separate data centers, and implementing load balancing to distribute traffic across multiple servers.

On top of this, everyone should be implementing a disaster recovery plan to ensure fast recovery after an unplanned incident such as damage to the data hall, natural disasters, cyber-attacks, and server failure.

Step 5: Choose suitable ISPs for your PoPs

Next, you’ll need to choose a mixture of internet service providers (ISPs). As well as being cost-effective your ISPs should have a strong geographic presence in the regions you wish to serve, reliable availability, and fast connection speeds even at peak times.

Step 6: Install SSL certificates

If you already have SSL certificates for your domain then you’ll need to upload these to all of your CDN servers. If you don’t have any certificates already, you’ll need to obtain these to validate your domain.

You can obtain SSL certification from various Certificate Authorities (CAs) or purchase a digital certificate from a domain name registrar or website hosting provider.

Step 7: Install CDN and caching software

The final step is to install a CDN software on your origin server and PoPs. CDN software typically comes with a full set of content delivery features including load balancing, persistent storage engines and high availability (HA). In addition it will let you set caching rules.

Is building your own CDN difficult?

If commercial CDNs aren’t proving a good fit for you then don’t despair. Building your own content delivery network takes work, but it’s not as daunting as it sounds. For businesses with highly specialized content needs, designing and building your own CDN can help you save money, promote growth, and create a bespoke solution for your target audience.

To close the blog, let’s hand the mic back to Jamie Panagos, Senior Director of Charter Communications, who has some words of encouragement.

“Don’t be scared, building your own purpose-built CDN is nothing like triggering a global thermo-nuclear apocalypse”.

Share

Related articles