How Containers Can Improve Content Delivery Networks

Of all the technology niches that containers have disrupted, Content Delivery Networks (CDNs) may not appear high on the list. To date, the biggest impact made by containers has centered around their ability to modernize infrastructure built with virtual machines, redeploy legacy apps, and the like.

Yet CDN, too, is ripe for change via containerization. Here’s a look at the opportunities that containers present for improving traditional approaches to CDNs.

CDN Challenges

For decades, CDNs have been used to distribute cached copies of content across a network of geographically dispersed servers. In doing so, they help ensure that Web content is geographically close to the users who want to access it, thereby reducing latency when delivering content to them. Lower latency means faster load times (not to mention better SEO rankings).

Despite being a well-established technology, however, CDNs today suffer from a variety of challenges:

  • Cost: CDNs are expensive to create and maintain, due in part to the fact that they require extensive infrastructure for hosting the CDN network as well as sophisticated software for managing and distributing content. The cost of signing up for a commercial CDN service can be a barrier for smaller organizations, which aren’t always able to take advantage of CDNs.
  • Privacy: For some organizations, CDNs pose privacy concerns because they require users to entrust their content to third-party networks that they don’t control.
  • Performance: Although CDNs address one key pain-point in content delivery – the time required to exchange information between geographically distant endpoints – they don’t address other potential performance issues. In fact, they can create new ones. For example, if the software that powers CDNs is slow to respond or becomes overwhelmed with requests, users may suffer worse performance than they would with content that is served without the help of a CDN but is hosted on a better-performing centralized server.
  • Dynamic content: Although it’s certainly possible to host dynamic content (meaning content that changes rapidly) on a CDN, it is tricky to do efficiently because the cached versions of the content need to be updated quickly whenever the content changes.

Using Containers to Revamp CDN

On their own, containers can’t solve all of the challenges described above. But they can alleviate them in several ways.

Lower CDN Cost

Since commercial CDNs are built mostly with closed-source technology, it’s impossible to know exactly how they handle content hosting and distribution internally. However, it seems a safe bet that the big CDNs have traditionally relied on virtual machines, which suffer higher performance overhead compared to containers. That means they need more physical infrastructure to achieve the same performance, leading to higher costs.

CDNs that transition to container-based infrastructure can therefore streamline this component of their expenses. Ideally, they’d then be able to pass on the savings to users, helping to lower CDN costs and make CDNs more accessible to companies with smaller budgets.

Self-Managed CDNs

Another way that containers could reduce CDN costs while also providing the added benefit of greater privacy control is by allowing organizations to forego commercial CDNs and launch their own self-managed CDNs instead.

Traditionally, running your own CDN has not been practical for all but the largest of companies because it has required a vast infrastructure and complex software deployment. But that is changing thanks to open source projects like KubeCDN, which promises to make it easy to build a private CDN using Kubernetes and public cloud infrastructure. Using a solution like KubeCDN, organizations can maintain direct control over their content while paying only for the cloud infrastructure they consume, rather than for a commercial CDN service.

While KubeCDN and similar projects remain basic at present (and not yet ready for production-grade use), there is good reason to expect them to mature and become a real alternative to traditional, big-name CDN providers in the coming years.

Better Performance

CDNs powered by containers are in a better position to maintain adequate performance even under heavy load. Not only do containers reduce the overhead placed on caching servers as compared to those running virtual machines, but they also offer the ability to spin up additional hosting instances very quickly – in a matter of seconds, compared to minutes for virtual machines.

This means that a container-based CDN has the potential to scale up rapidly by spawning more containerized content caches when demand peaks. This scalability reduces the risk of a CDN server in a particular region becoming overwhelmed and unable to serve requests adequately. It also means that if one CDN server fails for some reason, it can be quickly replaced by another one in the same region, instead of requiring the network to reroute traffic to a more distant region and thereby undercut the purpose of the CDN.

Dynamic Content Delivery

The ability to spin up new instances of a CDN cache quickly also improves the ability of CDNs to handle dynamic content. Instead of having to update an existing cache whenever dynamic content is modified, a CDN could simply destroy the existing cache and replace it with a new version based on the updated content.

This would, in effect, be akin to an immutable infrastructure approach to CDN management. It would not, however, entirely eliminate the pain-points related to dynamic content on CDNs; the new version of the content would still need to be distributed across the network or generated locally at regional servers – and that would take time.

Still, replacing an existing cache with a totally new one would potentially be faster than trying to update an existing cache. It would also simplify content management because there would be no need to run scripts that can generate dynamic content on each cache server locally – a practice that creates more room for error and more administrative overhead than does generating new versions of the content centrally and then distributing them to cache servers as distinct images.


To say that containers are the solution to all of the CDN ecosystem’s woes would be an overstatement. But they can certainly help to modernize the way content is distributed and managed within CDNs, reducing costs and enhancing privacy. They also stand to make it practical for anyone to deploy a self-managed CDN, freeing teams from dependency on the handful of commercial CDNs that predominate today.


You may also enjoy

Exploring Platform9 Managed OpenStack as a modern virtualization alternative

By Peter Fray

Create an Immutable Kubernetes Environment for Your CI/CD Pipeline

By Platform9

The browser you are using is outdated. For the best experience please download or update your browser to one of the following:

State of Kubernetes FinOps Survey – Win 13 prizes including a MacBook Air.Start Now