The Server-Side Pad

by Fabien Tiburce, Best practices and personal experiences with enterprise software

Case Study: Serving Video Using a Content Delivery Network

with 3 comments

When all you have is a hammer, everything looks like a nail.  Nowhere is this truer than in systems.  While application servers can host static content (images, flash videos, sound clips, etc…. ), they are not optimized for this purpose.  Ignoring this fact will typically affect the performance of the application and ultimately the user experience.  The organization may also be penalized with higher labour costs, slower time to market and higher hosting fees.  This article discusses content-hosting alternatives.  

Years ago, few choices existed.  Organizations purchased load-balancers and servers to host their static content.  Each dynamic page that needed a static resource would fetch it from a remote location, through the load balancer, typically via an API.  There is nothing wrong with doing that.  In fact, if your organization has little static content and/or untapped server capacity and bandwidth, this is still a good option.  But before you run out and purchase hardware, consider outsourcing the problem.  Large news organizations typically don’t host their own content, perhaps neither should you.

While cloud computing is one obvious alternative, cloud computing is not, in and out of itself, load balanced.  You still need to purchase computing instances, setup a software load balancer on one, and web servers on the others.  While this is typically cheaper than procuring hardware, you still have to setup and maintain software services, albeit on a cloud instance.  Cloud computing also doesn’t necessarily let you reap the benefits of a geographically-distributed infrastructure.  This is where Content Delivery Networks (CDN) come in.  A CDN (such as Limelight which we used to help deploy a large video-based training system) is a network of servers that transparently serve content from hundreds or thousands of servers.  The CDN will deliver content based on the user’s location by choosing the closest server thus improving performance.  A CDN will also replicate changes automatically across the network so when new or changed content is  uploaded, all servers are notified.  Hosting your organization’s content on a public network doesn’t have to mean it is visible to all.  We implemented Limelight’s MD5-encoded secret key to fetch our content securely.  Alternatively, content can be automatically set to expire after a set period of time (useful for paid downloads).

A CDN not only improves system performance, it requires no setup and no maintenance thus easing labour costs.  It can prove cheaper to host and serve a large library of static content such as video.  It is highly redundant and can be made secured.

Written by Compliant IA

January 13, 2009 at 6:14 pm

3 Responses

Subscribe to comments with RSS.

  1. Hi Fabien,

    The idea of cloud computing is to have your services and computing being deployed in hardwares that is not in your premisses. I agree with Load Balance part but how CDN can be compared with a cloud computing solution? Unless you want to manage the hardware issues, I believe the cloud computing may be a good solution to serve video. A good project must be designed to do this though.
    I dont know CDN but it seems to be a very good solution for whom do not care about have the infra on his view.
    PS: Sorry about the poor english. I’m from Brazil.
    PS2: Congratulation for your blog.

    Marcio Ferrini

    January 19, 2009 at 6:54 pm

    • Marcio, Your english is perfectly fine and thanks for your interesting question. First of all, let me say that a CDN is primarily used for static content (web server content) whereas a cloud instance can and often does host application server instances (application server dynamic content). Also setting up and maintaining a cloud instance is significantly more time consuming that uploading content to a CDN. In this respect you could say a cloud instance is like leasing a car (it does not belong to you but you are responsible for its maintenance) whereas a CDN is like taking the bus. In both cases, you put your content on someone else’s server. But the similarities end there. I should also say that clouds are now coming out with content delivery networks of their own to compete with the Limelight’s and Akamai’s of the world. So CDN and cloud instances are not mutually exclusive, although cloud and CDN vendors are trying to encroach on each other’s territory by offering both sets of services.

      Fabien Tiburce

      January 19, 2009 at 7:07 pm

  2. Hi Fabien,

    thanks for your response. I didn’t realize that CDN was solution provided by someone else. I though CDN was a pattern to be developed by the company itself.
    As a dedicated solution provided by a different, than the choice of which uses will depend of other factors.
    But as you said, they are not mutually exclusive so it would be important to see the pros and cons of each one and also the pros and cons to have both together.
    Thanks again.

    Marcio Ferrini

    January 19, 2009 at 7:36 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: