Silverlight Smooth Streaming: WAN optimization or Content Distribution Network?

I received an interesting question from someone setting up their own Smooth Streaming infrastructure recently, and I couldn’t help but blog it.

When setting up an on-demand Smooth Streaming infrastructure for a corporate environment, is it better to invest in WAN optimization, or Content Distribution?

It’s a great question, but let’s take a quick time out to make sure we’re on the same page with these terms.

WAN Optimization, in this case, is a device that functions as a web proxy at the front end of a network. It downloads data and caches it for the next person to conserve internet bandwidth. Simply put, if Bob and John are on a network using WAN Optimization, and Bob visited Google.com, the WAN optimizer would cache the Google logo image. When John visits Google.com a few minutes later, the WAN optimizer serves up the Google logo image from its cache, instead of requesting it again from Google’s servers. There are a few products that do this from a variety of manufacturers (for example, ISA Server from Microsoft).

On the other hand, a Content Distribution Network is a network of servers throughout the world on a really fast backbone with synchronized caching. End-users are routed to the closest/fastest content distribution server near them, and content is delivered at really zippy speeds.

So now that we have that down, the question becomes: Is speed (CDN) or caching (WAN Optimization) the better strategy for On-Demand Smooth Streaming?

The answer, of course, is: It depends.

Exploring Caching (WAN Optimization)

The reason Smooth Streaming works so well is illustrated in this graphic:

Traditional Streaming Quality Compromise

While traditional streaming is easy to work with (and easy to cache), there’s a quality tradeoff. Smooth Streaming works differently, in that the client player can dynamically adjust to network conditions, and constantly switch up the bitrate all willy-nilly. Typically, Smooth Streaming “chunks” are requested in 2 second intervals. This generates 8 possible URLs for every 2 seconds of video, plus another 1 URL for every 2 seconds of audio. Compared to a traditional progressive-download stream of a single-bitrate file, this can get interesting quickly:

Number of URLs possibly used to play a video

Video Length Traditional 1-bitrate Streaming URL Count 8-bitrate Smooth Streaming URL Count
2 seconds 1 9
60 seconds 1 270
120 seconds 1 540
300 seconds (5 min) 1 1,350
 
 

If this doesn’t make sense, take a moment to read Demystifying IIS Smooth Streaming / Live Smooth Streaming.

You might be thinking this is game over for WAN Optimization already, because there’s no way that caching could be effective when a client will only use 11% of the possible URLs available. That’s true, but it doesn’t take into account what actually, or I should say typically, happens.

image

This is a curve of typical usage we see. Silverlight clients for users on decent home or corporate connections will usually hit their stable bandwidth within 10 seconds, and won’t deviate a whole lot. This brings a lot more predictability into Smooth Streaming – the “in between” bitrates aren’t used much, and the more stable your network, the less jumping around you’ll see. In other words, WAN Optimizer is back in the game. In fact, we tested a small number of videos with just a few users watching over a couple days (using the IIS7 Application Request Routing module with caching), and achieved an over 70% cache rate.

Exploring Content Distribution Networks

The most well-known CDN in the world is currently Akamai. They operate a CDN made up of over 61,000 servers. There are also other popular ones (for example, we use both Akamai and EdgeCast for my company’s Smooth Streaming platform). They are typically deployed in one of two ways; either you provide the origin (content servers) and the CDN retrieves content from you dynamically as users request it, or you place the content directly on the CDN network.

The idea is that you can deliver high-speed content anywhere in the world over a CDN, by basically placing your content geographically “next door” to your viewers. A CDN could very well mitigate the need for WAN optimization, especially if your viewers are scattered in multiple locations.

Make a Decision Already

So, what’s most effective? It depends on the number of videos vs. the number of users on the same network. I summarize my cumulative experience and testing in the following decision grid:

image

If you have a low number of videos and a high number of users, WAN Optimization will provide Smooth Streaming infrastructure savings.

On the other hand, if you have a high number of videos and a lower number of users, your WAN caching device is a waste of money, and you may as well go with a CDN.

If you have lots of videos and lots of users, then a hybrid strategy is most likely to be effective.

Shameless Plug

This is one of the many problems I’ve had to address with Smooth Streaming technology. Like most technologies, it has an occasional tradeoff in exchange for some great benefits, and this is one of them.

One of my primary efforts over the last few months has been heavy design and development on a cloud-based Smooth Streaming platform that solves problems like this one. You may notice that some of the graphics in this post came from Nimbus (www.nimbushd.com). I figure it may be helpful to shed some light on how the design for Nimbus solves this issue, even if it’s considered a shameless plug. 😉

Nimbus is designed to fit in to all 4 spots on the decision grid above, with multiple CDN provider integration. Media assets in Nimbus are divided up into groups (called Media Bins), and by default, the bins are configured for distribution through Akamai. The idea is to provide the highest quality distribution to a virtually unlimited number of users. However, CDN distribution costs money, and for larger corporations, costs add up. For a corporation providing training or news videos to a large number of internal users, it doesn’t make sense to use a CDN to stream the same content over and over again to the same corporate network, so Nimbus supports the hybrid CDN+WAN model, allowing Media Bins to be changed on the fly between CDNs and on-site WAN caching configurations for the best possible cost savings and caching efficiency.

Hopefully between the theoretical discussion points and the actual Nimbus design, this sheds some light on how to make the WAN Optimization vs. CDN decision. Happy Streaming!

  • great article ... something what we are working on. Basically, we expect most traffic (expected 70%) within our 'small country', but also expect visitors from around the world. So we decided to direct all traffic from our country to our own streaming servers and the rest go to CDN.

    We plan to peer with CDN provider to forward traffic to our own edge & origin servers (using their GLB). Maybe by renting IP transit (from our colo servers in our country) to be in the CDN's network or using services such DNS.com to route trafic based on location. Many CDN do not have PoP in our country. What would be the best way/other way to have both world?

    • Brandon

      Just an idea, establish a file-synchronized origin server next to a CDN PoP in another country; that way you can take advantage of the CDN as necessary, and use your own servers within your country the rest of the time.

  • Hi, I do believe this is a great web site.
    I stumbledupon it 😉 I will revisit yet again since i have book-marked it.
    Money and freedom is the best way to change, may you be
    rich and continue to guide other people.