cancel
Showing results for 
Search instead for 
Did you mean: 

HowTo: Control Bandwidth Management

With Stingray, we can control bandwidth using a "Bandwidth Management Class".  This is reached from the GUI under "Catalogs> Bandwidth".  When you create a bandwidth class, it looks like this:

 

Google Chrome068.png

In the above example, we have created a bandwidth class called "5meg" that will limit traffic to "5000 kbit/sec".  The class will be enforced per traffic manager.

 

The class can be enforced in three different ways:

Google Chrome069.png

Bandwidth classes can be applied to either a Virtual Server or a Pool.  If it is applied to a VS, the class is enforced on egress and will control data being sent to the requesting client.  If it is applied to the Pool, the class is enforced on egress and will control traffic being sent to the pool.

 

To assign a bandwidth class to a VS in the GUI, you add it to the VS under the "Classes" section as pictured below:

Google Chrome070.png

In the above example. we have applied the "5meg" bandwidth class to the "myTestVS" virtual server.  You can see that this class is also used by the "testvs" virtual server also.  In this example, because the bandwidth class is enforced per Traffic Manager, it means that total traffic egressing the Traffic Manager from both the "myTestVS" and "testvs" virtual servers will be limited to 5000 kbit/sec.

 

In addition to applying bandwidth classes statically to virtual servers and pools, you can control Stingray's bandwidth management capabilities using a TrafficScript rule. For example, suppose you wish to apply bandwidth limits to large audio and video files, but not apply any limits to other files.

 

This example takes advantage of the fact that you can identify most audio and video transfers by inspecting the 'Content-Type' header value in the HTTP response, but you could easily use other logic if required.

 

The following TrafficScript response rule achieves this:

 

$mime = http.getResponseHeader( "Content-Type" );

if( string.startswith( $mime, "audio/" ) || string.startswith( $mime, "video/" ) ) {

   connection.setBandwidthClass( "multimedia" );

}

 

The 'multimedia' bandwidth class should be configured to use a smaller part of the total available bandwidth.

 

Read more

 

Version history
Revision #:
1 of 1
Last update:
‎02-24-2013 06:42:AM
Updated by:
 
Labels (1)