<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Jimin Gao&amp;#39;s Blog</title><subtitle type="html" /><id>http://blogs.iis.net/jimin_gao/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.iis.net/jimin_gao/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.iis.net/jimin_gao/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2008-04-22T23:29:00Z</updated><entry><title>Concepts of IIS Bit Rate Throttling – Part 2</title><link rel="alternate" type="text/html" href="http://blogs.iis.net/jimin_gao/archive/2008/05/01/concepts-of-iis-bit-rate-throttling-part-2.aspx" /><id>http://blogs.iis.net/jimin_gao/archive/2008/05/01/concepts-of-iis-bit-rate-throttling-part-2.aspx</id><published>2008-05-02T01:22:00Z</published><updated>2008-05-02T01:22:00Z</updated><content type="html">&lt;H1&gt;Managing Service Quality &lt;/H1&gt;
&lt;P&gt;There are many situations under which we would like to impose limits to file serving speed and the number of clients served. For example, a large rogue media file with a huge (faked) bit rate may&amp;nbsp;induce unfair server bandwidth contention with legitimate media files of small bit rates and cause their serving quality to deteriorate; similarly serving too many requests simultaneously for certain popular media files can also cause server saturation that defeats the purpose of progressive download—nobody can have a smooth viewing experience. The Bit Rate Throttling settings &lt;EM&gt;maximum throttle rate&lt;/EM&gt; and&lt;EM&gt; connection limit&lt;/EM&gt; are designed for better management of such undesirable scenarios. In addition, a &lt;EM&gt;default throttle rate&lt;/EM&gt; can be applied to all files at a certain location, being it a site, virtual directory, or physical folder, so that these files, which may be of too many different types to have a throttling setting for each, can all be served at a reduced constant speed when no explicit throttling settings apply. &lt;/P&gt;
&lt;H2&gt;Maximum Throttle Rate &lt;/H2&gt;
&lt;P&gt;The maximum throttle rate is the largest permitted speed to serve a &lt;EM&gt;throttled&lt;/EM&gt; file. For example, if the maximum throttle rate is set to 500kbps the previous FLV file configured to be throttled at 363kbps would still be served at 363kbps, while with a maximum throttle rate of 300kpbs (smaller than the calculated throttle rate) the file will be served at 300kbps. The same logic also applies to data file throttling. Note however the maximum throttle rate only affects files to be throttled (by file-type throttle settings or &lt;EM&gt;default throttle rate &lt;/EM&gt;settings) and those without applicable throttle settings will still be sent at full speed regardless. &lt;/P&gt;
&lt;P&gt;The maximum throttle rate can be used by server administrator to impose restrictions on different sites to ensure fairness and serving quality when used in combination with &lt;EM&gt;connection limit&lt;/EM&gt;. Typically it should be set and locked in &lt;EM&gt;applicationHost.config&lt;/EM&gt;. The maximum throttle rate can be configured through Bit Rate Throttling GUI (in &lt;EM&gt;Advanced Settings &lt;/EM&gt;dialogue), as demonstrated in &lt;A href="http://learn.iis.net/page.aspx/148/bit-rate-throttling-configuration-walkthrough/" mce_href="http://learn.iis.net/page.aspx/148/bit-rate-throttling-configuration-walkthrough/"&gt;this walkthrough&lt;/A&gt;, or by editing IIS configuration files. &lt;/P&gt;
&lt;H2&gt;Connection Limit &lt;/H2&gt;
&lt;P&gt;The maximum number of simultaneous HTTP connections, or the &lt;EM&gt;connection limit&lt;/EM&gt;, can be set for a collection of file types in an IIS site using the Bit Rate Throttling Module. For example, in a site we may define all FLV, AVI, ASF, and WMV files as a &lt;EM&gt;connection limit group&lt;/EM&gt; called &lt;EM&gt;Video&lt;/EM&gt;, and MP3 and WMA files as another called &lt;EM&gt;Audio&lt;/EM&gt;. For each defined connection limit group we can set a connection limit, for example, 100 for &lt;EM&gt;Video &lt;/EM&gt;and 200 for &lt;EM&gt;Audio&lt;/EM&gt;. Then the maximum number of simultaneous downloads for all files belonging to &lt;EM&gt;Video&lt;/EM&gt; will be 100, and the 101th request will be rejected with HTTP status code 503 (Service Unavailable). Similarly the 201th request for &lt;EM&gt;Audio&lt;/EM&gt; files will be rejected. Notably different from other Bit Rate Throttling configuration settings, the connection limit settings and restrictions are site based, and therefore &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A file may belong to different connection limit groups for different sites. &lt;/LI&gt;
&lt;LI&gt;Connection limits can be different for different sites. &lt;/LI&gt;
&lt;LI&gt;Any of these settings at levels lower than site are ignored. &lt;/LI&gt;
&lt;LI&gt;The current number of connections for a connection group is aggregated for each site and the connection limit restrictions are applied to each site independently. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Multiplying maximum throttle rate with the total connection limit of a site can give us the peak bandwidth usage for all the regulated files in this site. So used together these settings limit the bandwidth usage for different sites, especially of large media and data files to balance the service quality of different types of contents. For example, we may set the maximum throttle rate and connection limits for video files for every site, ensuring that their total peak usage will not exceed our server bandwidth so that every (served) user's experience can be guaranteed. We may also set these numbers to ensure the serving of HTML web pages&amp;nbsp;is not disrupted by the bandwidth usage of media contents. The connection limit groups and connection limits can only be set by editing IIS configuration files and are not accessible for GUI. See &lt;A href="http://blogs.iis.net/jackfree/archive/2008/03/18/bit-rate-throttling-for-iis7-amp-connection-limit-groups.aspx" mce_href="http://blogs.iis.net/jackfree/archive/2008/03/18/bit-rate-throttling-for-iis7-amp-connection-limit-groups.aspx"&gt;Jack's blog&lt;/A&gt; for how this can be done. It is recommended they are configured and locked in &lt;EM&gt;applicationHost.config &lt;/EM&gt;only. &lt;/P&gt;
&lt;P&gt;(&lt;STRONG&gt;Note&lt;/STRONG&gt;: there is an issue in the current release that connection limits are at times not correctly enforced. This is to be addressed by a forthcoming patch.) &lt;/P&gt;
&lt;H2&gt;Default Throttle Rate &lt;/H2&gt;
&lt;P&gt;The &lt;EM&gt;default throttle rate&lt;/EM&gt; acts as the fallback throttle rate when no explicit throttle settings can be applied to calculate the throttle rate of a file. When set to 0, default throttle rate is disabled and files without applicable throttle settings will be sent at full speed at HTTP responses. The default throttle rate is a convenience feature to manage the send rate of all file types in a particular location, which may be a site, a virtual directory, or a physical folder (through &lt;EM&gt;web.config&lt;/EM&gt;), so that we do not have to add a throttle settings for each type. By purposed arrangement of files into different locations, the default throttle rate to an extent can be used for managing total bandwidth usage and service quality as well. &lt;/P&gt;
&lt;H1&gt;Dynamic Throttling &lt;/H1&gt;
&lt;P&gt;The maximum throttle rate and connection limits are typically used for setting a bandwidth allowance for a site, but this peak estimate is rarely used in full; files usually are throttled at a rate much lower than the maximum throttle rate, and connection limits are not reached most of the time. Dynamic Throttling is a Bit Rate Throttling feature designed to make better usage of the reserved bandwidth for a site or connection limit group. The per-site setting &lt;EM&gt;target throughput rate&lt;/EM&gt; explicitly states the total bandwidth allowance for regulated files in a site, and when under light load the Bit Rate Throttling Module will scale up the throttle rates to make maximal usage of this allowance. The throttle rates are adjusted up and down on-the-fly depending on the throttle rate presets and the number of connections for the files but never lower than the presets. For example, there is a file &lt;STRONG&gt;A&lt;/STRONG&gt; with the throttle rate (calculated from configuration) of 400kbps and a file &lt;STRONG&gt;B&lt;/STRONG&gt; with the throttle rate of 100kbps belonging to the same site with its target throughput rate set to 5000kbps. Their actual throttle rates will be scaled up to 4000kbps and 1000kbps so the total bandwidth is equal to the target throughput rate 5000kbps when &lt;STRONG&gt;A&lt;/STRONG&gt; and &lt;STRONG&gt;B&lt;/STRONG&gt; are simultaneously served. Now suppose another request for &lt;STRONG&gt;A&lt;/STRONG&gt; comes in. Serving this additional request, the Bit Rate Throttling Module will adjust down the throttle rates proportionately. File &lt;STRONG&gt;A&lt;/STRONG&gt; will then be sent at 500 * 5000 / (500 * 2 + 100) = 2273kbps and &lt;STRONG&gt;B&lt;/STRONG&gt; at 100 * 5000 / (500 * 2 + 100) = 455kbps; the total bandwidth usage for all 3 connections is still 5000kbps. When one of the responses is finished, the rest will be again adjusted up. Note that the throttle rate will never be adjusted to lower than the configured rate, 500kbps for &lt;STRONG&gt;A&lt;/STRONG&gt; and 100kbps for &lt;STRONG&gt;B&lt;/STRONG&gt; in this case, even when the target throughput rate is exceeded due to a large number of connections. Un-throttled files will not be affected by dynamic throttling. &lt;/P&gt;
&lt;P&gt;In addition to sites, the target throughput rate&amp;nbsp;can be&amp;nbsp;configured for connection limit groups as&amp;nbsp;well&amp;nbsp;with similar logic (note connection limit group itself is a site-level only setting).&amp;nbsp;&amp;nbsp;The configuration&amp;nbsp;can be&amp;nbsp;done&amp;nbsp;from the GUI (sites only) or by editing IIS configuration files. See &lt;A href="http://blogs.iis.net/vsood/archive/2008/03/17/dynamic-throttling-with-bit-rate-throttling.aspx" mce_href="http://blogs.iis.net/vsood/archive/2008/03/17/dynamic-throttling-with-bit-rate-throttling.aspx"&gt;Vishal's blog&lt;/A&gt; for a more thorough description of this feature. &lt;/P&gt;
&lt;P&gt;(To be continued …)&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2333130" width="1" height="1"&gt;</content><author><name>jimin_gao</name><uri>http://blogs.iis.net/members/jimin_5F00_gao.aspx</uri></author><category term="BRT" scheme="http://blogs.iis.net/jimin_gao/archive/tags/BRT/default.aspx" /><category term="Bit Rate Throttling" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Bit+Rate+Throttling/default.aspx" /><category term="IIS" scheme="http://blogs.iis.net/jimin_gao/archive/tags/IIS/default.aspx" /><category term="Bandwidth" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Bandwidth/default.aspx" /><category term="Bit Rate" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Bit+Rate/default.aspx" /><category term="Media Pack" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Media+Pack/default.aspx" /><category term="Media" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Media/default.aspx" /></entry><entry><title>Concepts of IIS Bit Rate Throttling – Part 1</title><link rel="alternate" type="text/html" href="http://blogs.iis.net/jimin_gao/archive/2008/04/22/concepts-of-iis-bit-rate-throttling-part-1.aspx" /><id>http://blogs.iis.net/jimin_gao/archive/2008/04/22/concepts-of-iis-bit-rate-throttling-part-1.aspx</id><published>2008-04-23T06:29:00Z</published><updated>2008-04-23T06:29:00Z</updated><content type="html">&lt;P&gt;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. &lt;/P&gt;
&lt;P&gt;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. &lt;/P&gt;
&lt;P&gt;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. &lt;/P&gt;
&lt;H1&gt;Intelligent Media File Throttling &lt;/H1&gt;
&lt;P&gt;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 (&lt;EM&gt;throttle rate percentage&lt;/EM&gt;) 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 &lt;EM&gt;fast start time&lt;/EM&gt; 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. &lt;/P&gt;
&lt;H2&gt;Supported Media Formats &lt;/H2&gt;
&lt;P&gt;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 &lt;EM&gt;throttle rate percentage&lt;/EM&gt; and &lt;EM&gt;fast start time&lt;/EM&gt; can be configured per file type through Bit Rate Throttling GUI or by editing IIS configuration files. See &lt;A href="http://learn.iis.net/page.aspx/148/bit-rate-throttling-configuration-walkthrough/" mce_href="http://learn.iis.net/page.aspx/148/bit-rate-throttling-configuration-walkthrough/"&gt;this walkthrough&lt;/A&gt; for how this can be done. &lt;/P&gt;
&lt;H2&gt;Extended Media Format Support &lt;/H2&gt;
&lt;P&gt;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: &lt;/P&gt;
&lt;P&gt;1.&lt;SPAN style="FONT-SIZE: 7pt"&gt; &lt;/SPAN&gt;Bit rate information exists in the media file at a fixed offset from a certain keyword (search pattern), OR&lt;SPAN style="FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;2.&lt;SPAN style="FONT-SIZE: 7pt"&gt; &lt;/SPAN&gt;Content duration information exists in the media file at a fixed offset from a certain keyword (search pattern).&lt;SPAN style="FONT-SIZE: 10pt"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;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. &lt;/P&gt;
&lt;P&gt;The media format information can be added to by editing the IIS configuration file and this functionality is not accessible from GUI. See &lt;A href="http://learn.iis.net/page.aspx/149/bit-rate-throttling-extensibility-walkthrough/" mce_href="http://learn.iis.net/page.aspx/149/bit-rate-throttling-extensibility-walkthrough/"&gt;this walkthrough&lt;/A&gt; 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 &lt;EM&gt;throttle rate percentage&lt;/EM&gt; and &lt;EM&gt;fast start time&lt;/EM&gt; can be configured just like natively supported media files. &lt;/P&gt;
&lt;H1&gt;Data File Throttling &lt;/H1&gt;
&lt;P&gt;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 &lt;EM&gt;data&lt;/EM&gt; files and similarly to &lt;EM&gt;media&lt;/EM&gt; files their &lt;EM&gt;throttle rate&lt;/EM&gt; 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 &lt;EM&gt;initial send size&lt;/EM&gt; (in kilobytes) for each data file type corresponding to the &lt;EM&gt;fast start time&lt;/EM&gt; of media files. &lt;/P&gt;
&lt;P&gt;The &lt;EM&gt;throttle rate&lt;/EM&gt; and &lt;EM&gt;initial send size&lt;/EM&gt; 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 &lt;EM&gt;throttle types&lt;/EM&gt;, which may be &lt;EM&gt;media&lt;/EM&gt; or &lt;EM&gt;data&lt;/EM&gt;. This explicit distinction is necessary because a media type known to Bit Rate Throttling can nonetheless be treated as either &lt;EM&gt;media&lt;/EM&gt; or &lt;EM&gt;data&lt;/EM&gt; files for throttling purpose. See &lt;A href="http://learn.iis.net/page.aspx/148/bit-rate-throttling-configuration-walkthrough/" mce_href="http://learn.iis.net/page.aspx/148/bit-rate-throttling-configuration-walkthrough/"&gt;this walkthrough&lt;/A&gt; for detailed steps to configure data file throttling. &lt;/P&gt;
&lt;P&gt;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. &lt;/P&gt;
&lt;P&gt;(&lt;A class="" href="http://blogs.iis.net/jimin_gao/archive/2008/05/01/concepts-of-iis-bit-rate-throttling-part-2.aspx" mce_href="http://blogs.iis.net/jimin_gao/archive/2008/05/01/concepts-of-iis-bit-rate-throttling-part-2.aspx"&gt;Continue to Part 2&lt;/A&gt;)&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2314701" width="1" height="1"&gt;</content><author><name>jimin_gao</name><uri>http://blogs.iis.net/members/jimin_5F00_gao.aspx</uri></author><category term="BRT" scheme="http://blogs.iis.net/jimin_gao/archive/tags/BRT/default.aspx" /><category term="Bit Rate Throttling" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Bit+Rate+Throttling/default.aspx" /><category term="IIS" scheme="http://blogs.iis.net/jimin_gao/archive/tags/IIS/default.aspx" /><category term="Bandwidth" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Bandwidth/default.aspx" /><category term="Bit Rate" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Bit+Rate/default.aspx" /><category term="Media Pack" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Media+Pack/default.aspx" /><category term="Media" scheme="http://blogs.iis.net/jimin_gao/archive/tags/Media/default.aspx" /></entry></feed>