Bit Rate Throttling is the first IIS extension module released in IIS Media Pack. It adds to IIS the capability of per-response bandwidth control for the delivery of media and data contents. The idea for this module initially grew out of the need to serve progressive media downloads while saving bandwidth costs. Its core functionality was to automatically detect the encoded bit-rate of files of a wide range of video and audio formats and serve the requests at a ratio to the encoded bit-rate as specified by the administrator. However, during its development we saw the needs of more general bandwidth control capabilities that can be logically combined with its media functionalities and over time Bit Rate Throttling Module has evolved into a full-rounded bandwidth control package for IIS.
There are several blog articles describing in detail aspects of Bit Rate Throttling. Here however I would like to give an overview of the capabilities of this module, not too drawn into the technical details but with enough information for a clear understanding of its capabilities so that users looking for solutions to their problems can make informed decisions. This article also tries to serve as the string for the beads and will provide links to previously available articles within this context, so that those interested in more hands-on details can easily locate the needed resources.
The basic promise of Bit Rate Throttling is the measured slowing down of sending out a HTTP response. The actual send speed can be controlled in various ways for various purposes and the most notable one is the automatic throttling of media files.
Intelligent Media File Throttling
Bit Rate Throttling for IIS can automatically detect the encoded bit rate of a media file and send the file at an administrator-configured speed ratio to this bit rate. For example, if an ASF video file has a video data rate of 300kbps (kilobits per second) and audio data rate of 30kbps, and ASF files are configure to be sent at the speed ratio (throttle rate percentage) of 110%, this file will be sent at the speed of (300kbps + 30kbps) * 110% = 363kbps. This speed is sufficient for uninterrupted viewing of the video on the client side assuming ample network bandwidth between the server and the client. However, to factor in possible network fluctuations most media players buffer some of the content before starting to play. Correspondingly Bit Rate Throttling has a configurable fast start time for each media type such that initial media content within this (play) time period will be sent without throttling so that the player buffer can be quickly filled before playing. For example, if ASF files are configured to have a fast start time of 10 seconds, then the initial (300kbps + 30kbps) * 10s = 3300kb of the file above will be sent at full speed and the rest will then be sent at 363kbps.
Supported Media Formats
The types of media files supported by Bit Rate Throttling upon installation includes ASF, WMV, WMA, FLV, MP3, MP4, M4V, MOV, AVI, RM, and RMVB. The throttle rate percentage and fast start time can be configured per file type through Bit Rate Throttling GUI or by editing IIS configuration files. See this walkthrough for how this can be done.
Extended Media Format Support
It is also possible for Bit Rate Throttling to support additional media formats, assuming the format specifications are known and have the following characteristics so that their encoded bit rates can be obtained using a simple search:
1. Bit rate information exists in the media file at a fixed offset from a certain keyword (search pattern), OR
2. Content duration information exists in the media file at a fixed offset from a certain keyword (search pattern).
Most known media file formats satisfy these properties and therefore can be supported by Bit Rate Throttling. In essence, the Bit Rate Throttling Module will first find the search pattern (keyword) in the file and then read the bit rate or duration information at the offset. The bit rate or duration information may be encoded in various formats, such as big or little-endian and float or integer. If there are multiple bit rates available, such as in the previous example where the ASF file has a video bit rate of 300kbps and an audio bit rate of 30kbps, they are added together to obtain the total bit rate 330kbps. If there is only duration information available, it is used to divide the file size to obtain the estimated bit rate.
The media format information can be added to by editing the IIS configuration file and this functionality is not accessible from GUI. See this walkthrough for how this can be done. It is worth noticing that most out-of-the-box media type supports are attained though the same mechanism except for MP3 and AVI files which have dedicated file parsers due to their complexity. Once a file type is added to media formats in IIS configuration files, the media format becomes known to Bit Rate Throttling and their throttle rate percentage and fast start time can be configured just like natively supported media files.
Data File Throttling
Files not treated (known to Bit Rate Throttling Module) as video/audio media can be sent at a fixed rate as HTTP responses using Bit Rate Throttling. They are called data files and similarly to media files their throttle rate can be configured per file type (extension). However the rate is not specified as a percentage ratio but absolute send speed in kbps. There is an also a configurable initial send size (in kilobytes) for each data file type corresponding to the fast start time of media files.
The throttle rate and initial send size for data files can be configured through Bit Rate Throttling GUI or by editing IIS configuration files. The configuration entries for media and data files are distinguished by their throttle types, which may be media or data. This explicit distinction is necessary because a media type known to Bit Rate Throttling can nonetheless be treated as either media or data files for throttling purpose. See this walkthrough for detailed steps to configure data file throttling.
The throttling of data files can be useful for the distribution of large documents such as PDF and PPT files which similarly to media files are inherently serial but do not have the notion of unit-time bit rates.
(Continue to Part 2)
Comments