ClusterFunk


IIS 7 Bandwidth Throttling


Mar 09

Posted: under IIS7, Media Streaming.

Bandwidth Throttling

Towards the end of last year I conducted a proof of concept on a hardware TCP streaming appliance that has some very impressive stats for a 1u device. Non-disclosure prevents me from discuss the specifics however one of its key features is the ability to throttle bandwidth in response to the client requests, the appliance is aware of the encoding, container format and bit-rate of the asset and is therefore able to delivery just the right amount of data in the response to provide optimum user experience. This is in marked contrast to traditional http progressive download which starts sending as much data as it can (see below) resulting in periods of bursting activity or worse sending data that has already been cancelled by the user.

The ability to throttle enables a direct correlation between number of connections and bandwidth utilised/required. This is excellent news for solutions architects trying to design platforms capable of providing a consistent user experience based on number of users/clients. Here is an example of that correlation: 

Requests

image_thumb2

Bandwidth

 image_thumb1

The stats taken from Hardware Appliance POC.

IIS 7 Bandwidth Throttling capability

“The Internet Information Services (IIS) Media Pack – Bit Rate Throttling module provides the ability to throttle progressive downloads of media files (in which audio/video playback starts as soon as sufficient data has been buffered on the client) based on the content bit rate. For sites that deliver audio and video files that may not be watched in their entirety, this module could significantly reduce your media-related bandwidth costs. A secondary feature of the Bit Rate Throttling Module is that it can also be used to throttle non-media ("Data") file types at specified bit rates”

Install

So lets install it then….

32 & 64 bit versions (Top top: its 64bit all the way now baby ;) 32bit is so last century  )

http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1762

http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1764

image_thumb[12]

image_thumb[13]

image_thumb[14] 

image_thumb[15] 

That was painless ;)

So IIS 7 can throttle the bandwidth of a given asset type based on configuration entered at the Server level, Site Level or directory level.

It is limited in the sense that it doesn’t inspect the media itself it relies on the media having the attributes as per the configuration (XML). 

If you wanted to host different H.264 container formats you would need to separate the assets into different server/site/directories. While I’m at it Silverlight is getting H.264 support which is good news for us TAs trying to deliver a one size fits all solution.   

image 

No Bandwidth Control

Here is an example of none throttled asset playback. This image shows the playback of four sessions, notice the spiky nature of the trace. This is to do with the TCP/IP “congestion window updates” window. It is related to the way that the HTTP server fires off data while at the same time TCP/IP protocol utilises techniques to accommodate network events such as packet loss and network latency. The net result is burst traffic profile with some streams been badly effected.

image

Here is a single Asset

image 

image

This is taken from my smooth POC setup. More details here.

Looking at the red line on the right you can see the asset starts playing at 300kbps and ramps up (v.quickly) to 2.436mbps. On the left is a capture of the nic output using task manager. Notice the initial burst of activity, this is an initial the population of a buffer cache, followed by the spiky data stream.

Bring forth the jiggery pokery (Turn on Throttling :) ) 

Now lets see the trace with a bandwidth throttle on the same asset. (Its difficult to see as the line is in line with the background grid) You can instantly see that the bandwidth delivered by the server is even and consistent.

It WORKS!

image

image_thumb2[1][1]

 

POC Appliance  

Its work mentioning that the hardware appliance mentioned at the start of this post does bandwidth throttling even better than IIS7 or equivalent Linux implementation for that matter.

Notice that unlike the trace above there is no initial burst. The asset starts streaming at a constant bit rate until it is completed.

image 

What are the key benefits?

  • Lower bandwidth costs by only sending required packets
  • Deterministic behaviour per stream in relation to packet loss and round trip delays
  • Higher aggregate throughput
  • Traffic that is more suited to congested networks

and the most important in my view

  • Each client / user gets the same quality of service in relation to data deliver assuming equal capability on the client side

Rather than re-invent the wheel there is a great article here about how to actually configure Bandwidth Throttling in IIS7 needless to say its pretty straightforward to set up and very cool :)

Also its worth mentioning that I am assured that this relatively strait forward to implement this using the “amazing” Zeus ZXTMs assuming you are not going to deploy IIS 7 e.g. you are delivering flash based media. I will have a word with the good people and Zeus to see if they can provide a knowledge base article around this on the substantial Zeus knowledge hub site.  

If you are interested in adopting this or any of the technologies mention on this blog please contact me via iokowww.ioko.com and me or one of my fellow iokons (is that a word… no) will be more than happy to discuss your requirements.    

Comments (0)

Adaptive Streaming Microsoft IIS 7


Mar 06

Posted: under IIS7, Media Streaming, Tool, Tips and Tricks, Windows 2008.

So its been a while, I have been very busy with lots of different projects including a number of VOD platform proposals and a Windows 2008 active directory design for a gaming company with international presence….

So excuses over I have decided to have a good look adaptive streaming and Microsoft adaptive streaming capabilities in Windows IIS 7.

Adaptive Streaming What is it?

Traditionally streamed assets are encoded at a specific bitrate and presented along the lines of low, medium and high quality streams. It’s up to the users to request the appropriate stream for their connectivity. If they pick the wrong one they must stop the stream and try a different one.

Apart from the obvious issues with customer satisfaction, this raises issues with content providers. They have to provide multiple encodings of assets at differing bit rates, users can request inappropriate streams leading to waste of network bandwidth and capacity. “I need to server 10,000 stream but actually need capacity to server 10,500 dues to user error”. When you consider different container formats you quickly end up with a considerable number of stream to manage and associated infrastructure.

image

Move Networks have a patented adaptive streaming technology which:  

“divides video into segments called “streamlets” and encodes them using a single process for multiple bandwidths (dial-up, broadband, wireless) and platforms (computer, television, cell phone). A dual-pass variable bit rate encode is used on both live and on-demand streams, preparing video images with sharp, HD quality”

Microsoft invested an undesclosed sum in Move Networks in August last year after announcing a partnership with MN in March of the same year in relation to the SilverLight cross browser player.

Microsoft IIS 7 with Smooth Streaming 

So IIS 7 recently received adaptive streaming capability in the form of an IIS media extension called Smooth Streaming.

IIS Smooth Streaming

This diagram gives you a flavour for how the technology delivers a variable bit rate stream to the player.

streamlets

Installing on IIS 7 with Smooth Streaming Windows Server 2008

image

Select Server role

image

Message about required dependencies

image

Intro to IIS7

image

Confirm installation components 
Selected ASP.NET and then let the defaults install

image

image 

Quick points of interest:

IIS 7 doesn’t use a metabase anymore for configuration. Everything (components) is configured in XML configuration files. If you intend to configure IIS7 remotely this capability needs to be installed. In fact most IIS6 standard functions like support for authentication, serving default page or directory browsing needs to be configured/installed. This is good news from a security/attack vector perspective but a pain in the posterior when you are doing hands on lab type work :)   – can’t please all the people all the time.

Installing

image

Components installed results

 image

and install log

image

Viewing Server Roles now shows

image

 

Ok Once IIS7 is installed lets install Smooth Streaming media extension

image

image

image

And that’s that. Don’t even need a reboot ;)

image

 

image

 

You can download the demo material from Microsoft

OR

You can encode your you own using Microsoft Expression Encoder

Great Guide here

Install

image

image 

image

GUI

image

Expression Encoder 2 SP1 provides built-in features that make it easy to create Smooth Streaming presentations simply by choosing Adaptive Streaming video and audio profiles and the IIS Smooth Streaming output media format

image

Playback and Adaptive streaming in practice

Screenshot shows player. Notice the graph at bottom left.

This shows the bit rate of the stream.

image

In this screenshot I have throttled the bandwidth to demonstrate the artifacts of the lower bit rate stream.

image

The quality is superb

image

:)

image

Again I throttle the bandwidth

image

and then remove the restriction it resolves

image

 

Links

More details for IIS7 configuration

http://learn.iis.net/page.aspx/569/smooth-streaming-for-iis-70—managing-your-presentations/

Silverlight

http://www.microsoft.com/silverlight/

Deep Dive IIS 7 configuration

http://learn.iis.net/page.aspx/127/deep-dive-into-iis-7-configuration/

Expressions Encoder

http://expression.microsoft.com/en-us/cc507507.aspx

Comments (1)

Video Delivery Proof of Concept


Dec 11

Posted: under Industry, Media Streaming.

image

I am currently working on a proof of concept project using a very new 1U solid state device. This is a very cool appliance that can delivery many 10s of thousands of simultaneous VOD (video on demand) streams from a 1U form factor device. It has multiple 10Ge interfaces and when running full tilt uses 85w power. 

Very clever stuff but right now none disclosure prevents further details… watch this space.

:)

Comments (0)

Media Streaming Resources


Nov 23

Posted: under Media Streaming.

Here is some information to get you started with media streaming.

FLASHimage

 

You can register & download trail version of Flash Media Development Server here

 

Flash video learning guide
http://www.adobe.com/devnet/flash/articles/video_guide.html 

Flash video (FLV) bitrate calculator
http://www.adobe.com/devnet/flash/apps/flv_bitrate_calculator/index.html

image

Adobe Flash Media Interactive Server 3.5
http://www.adobe.com/products/flashmediainteractive/

SilverLight

 image

Media Overview
http://www.microsoft.com/silverlight/overview/media.aspx

Free 10Gb Streaming Silverlight account
http://streaming.live.com/account/create.aspx

Silverlight FAQ
http://www.microsoft.com/silverlight/overview/faq.aspx
http://www.microsoft.com/silverlight/resources/streaming.aspx

Silverlight Samples
http://silverlight.net/community/gallerydetail.aspx?cat=1&sort=2

Sample Media for testing

A variety of files encoded in range of formats and sizes to facilitate testing.

http://www.creatoon.com/samples.php
http://www.mediacollege.com/adobe/flash/video/tutorial/example-flv.html

How to install Windows Media Services in Windows Server 2008

Its not included in the standard deployment like Windows 2003 

http://support.microsoft.com/kb/934518

image

Comments (0)