IIS 7.0 Bit-rate throttling module

Last week, the IIS team released bit-rate throttling module to the web.

As the self-proclaimed daddy of the project (I designed and wrote the initial prototype in early 2007), I am very thrilled to see it out. The new IIS media team folks have done a great job getting it production ready and rounding out the feature-set, which you can review in its full glory in Vishal's post.

Download links:
– 32 bit – http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1640
– 64 bit – http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1641

So what is the bit-rate throttlng module about? In essense, it is an effective solution for saving a LOT of bandwidth for web sites serving media

Imagine this scenario – a client connects to your video site, clicks on your featured video, watches 5 seconds of it to realize they have no interest in watching further, and move on to the next video.

In those 5 seconds, the server could have sent out 5 minutes worth of the video, and you paid for 5 minutes worth of bandwidth. With the bit-rate throttler + media bitrate detection, the server would only end up sending a little over 5 seconds worth, and you would end up paying only for what was used.

This translates to VERY major savings for most video sites.

The way I originally wrote the module, it was actually comprised of two separate modules: a throttler, and the media bit-rate detector. Eventually these got combined into a single module, but it is still useful to think about it from the point of view of two separate features.

  • The throttler component is a mechanism to control the rate at which IIS sends out the response for any request to the server.  It works in conjuction with another module or configuration that instructs it to do two things for any response: pre-send any configured amount of data without restricting the response rate, and then send the rest of the response at the configured rate.
  • The bit-rate detector is a separate module that can parse common media files, and determine their encoded rate (many video file formats, including ASF, include the maximum encoded rate in the header of the media file). It can then configure the throttler to send that media file at a rate that is just over the encoded rate.

It's also worth noting that the throttler uses a high-performance asyncronous loop to push the data out, without tying up server threads for what can be a very long operation. For responses coming from files (like most large video files), it also does not need to read the content's of the file being sent into memory, instead just instructing http.sys to send portions of the file out to the client at a time.  Because of this, it won't significantly affect your memory usage. While this mechanism is not as efficient as http.sys's own site-wide bandwidth throttling (which cannot be used to do what we are trying to accomplish here), it is pretty much as lean as it can be.

While these two components play different roles, the current bit-rate module release combines them into a single module.  Still, thanks to the flexibility of configuration, you can set both static rules for throttling abitrary content on your site, as well as rules that can automatically detect the bit-rate of media files.

In addition to controlling the response rates, the bit-rate throttling provides the following features:

  • Fast Start – the ability to send the first part of the media file without rate limiting, to seed the playback buffer in the player and make sure that playback can begin as soon as possible (most players try to prebuffer a certain amount of the video, often 5 seconds, before starting playback). This also insures that if the connection suffers a hickup, the playback can continue uninterrupted
  • Disconnect detection – when the client stops watching the video, goes to another page, or closes the video, the bitrate throttler detects the connection closure and stops sending the file.
  • Built-in support for detecting the playback rate for common media formats, including .asf, .avi, .flv, .m4v, .mov, .mp3, .mp4, .rm, .rmvb, .wma, and .wmv.
  • Ability to configure static throttling rates, and media auto-detection rates at any configuration level.

It is also possible to add support for additional media formats by using the configuration that tells the module how to find the bitrate in the mediate file. Finally (as I intended from the very start), the module retains the ability to configure the throttling rate programatically.  This means that you can write your own module that automatically determines the desired throttling rate for any response – media or not – which opens up the possibilities for any custom throttling scheme.

The bit-rate throttling support is a key part of the media story comprising Silverlight, Expression encoder, and future media features coming out of the IIS 7.0 team. And, it directly affects your bottom line by saving cold hard cash on bandwidth costs, which can get fairly large for media-intensive sites.

So, go download the bit-rate throttler and start saving money today (and let me know if you are – I'd love to hear your success stories).

Thanks,

Mike

15 Comments

  1. Anonymous

    【原文地址】 IIS 7.0 Bit Rate Throttling Module Released | IIS 7.0比特率节流模块发布了 【原文发表日期】Tuesday, March 18, 2008

  2. Anonymous

    After almost 5 years at the company, I am both sad and excited to say that I’ll be leaving the IIS team and Microsoft at the end of this week. Looking back, I can say that my experience at Microsoft has been truly amazing

  3. Anonymous

    Good afternoon everyone. I’m italian, so please excuse me for my english. I spent almost 3 days trying to configure the bitrate throttling module on iis 7 (the OS is windows server 2008), but I didn’t manage to make it work! I followed the papers provided by the site of microsoft, but still nothing… could you maybe give me some hints? The problem is that when I connect using windows media player (“open url” menu…), the server gives me the firs part of the file at a high speed, and then the rest of it at abou 1Mbps (I’m working on a LAN). This behaviour happens even if bitrate throttling is disabled, and also when the throttle rate is set to other bigger values. Might someone of you help me? Greetings to everyone!

  4. iams13

    Hello, this is crash information. The usage environment is IIS8.5
    P1: w3wp.exe
    P2: 8.5.9600.16384
    P3: 5215df96
    P4: bitratemodule.dll
    P5: 7.1.99.0
    P6: 47d7b930
    P7: c0000005
    P8: 0000000000007a5a
    P9:
    P10:

  5. iams13

    Hello, this is crash information. The usage environment is IIS8.5
    P1: w3wp.exe
    P2: 8.5.9600.16384
    P3: 5215df96
    P4: bitratemodule.dll
    P5: 7.1.99.0
    P6: 47d7b930
    P7: c0000005
    P8: 0000000000007a5a
    P9:
    P10:
    Can you open the source code to me? I can fix the crash

Leave a Reply

Your email address will not be published. Required fields are marked *