Product Documentation

Traffic Shaping

Aug 06, 2013
The CloudBridge traffic shaper is an easy-to-use solution for link congestion. Traffic shaping is highly configurable for sites with special needs, but the default settings are fine for most installations, providing the following benefits:
  • Increased responsiveness for interactive traffic such as XenApp and XenDesktop.
  • Protection of latency- and jitter-sensitive VoIP traffic.
  • No “hitting the wall” during peak periods. You get usable performance even under extreme load.
  • Improved bandwidth utilization by allowing bulk transfers to fill the link with whatever bandwidth is left over from interactive tasks.
  • Extension of the benefits of fair queuing to all traffic
The traffic shaper is based on bandwidth-limited fair queuing, which gives each service class its fair share of the link bandwidth. If the link is otherwise idle, any connection (in any service class) can use the entire link. When multiple connections are competing for the link bandwidth, the traffic shaper applies traffic shaping policies to determine the right mix of traffic. Every TCP connection or non-TCP flow has a traffic shaping policy. The traffic shaping policy is arrived at in a three-stage process:
  1. The traffic is examined by the application classifier to determine what application it belongs to.
  2. The application is looked up in the service-class list to see which service-class it belongs to.
  3. The traffic-shaping policy specified by the service-class definition sets the weighted priority and other parameters for this traffic.
The total bandwidth available for all connections sharing a link is determined by a link definition. Similarly to the way an application is matched against a list of service classes to determine the service class, a link is matched against a list of link definitions find the definition that specifies the inbound and outbound bandwidths of the link. To remember which entity does what, keep the following points in mind:
  • The link definition tells the traffic shaper how fast to send data for the link.
  • The application classifier determines which service class to use.
  • The service-class definition specifies the traffic-shaping policy and whether acceleration is to be attempted.
  • The traffic-shaping policy sets the weighted priority and a few other parameters to be used on the traffic.
Note: For more information about the application classifier and service classes, see Mechanisms Common to Acceleration and Traffic Shaping.
Some highlights of the traffic shaper:
  • All WAN traffic is subject to traffic shaping: accelerated connections, unaccelerated connections, and non-TCP traffic such as UDP flows and GRE streams.
  • The algorithm is weighted fair queuing, in which the administrator assigns each service class a priority. Each service class represents a bandwidth pool, entitled to a minimum fraction of the link speed, equal to (my_priority/sum_of_all_priorities). A service class with a weighted priority of 100 gets twice as much bandwidth as a service class with a weighted priority of 50. You can assign weights from 1 through 256.
  • Each connection within a service class gets an equal share of the bandwidth allotted to that service class.
  • Each connection gets its fair share of the link bandwidth, because priorities are applied to the actual WAN data transferred, after compression. For example, if you have two data streams with the same priority, one achieving 10:1 compression and the other achieving 2:1 compression, users see a 5:1 difference in throughput, even though the WAN link usage of the two connections is identical. In practice, this disparity is desirable, because WAN bandwidth, not application bandwidth, is the scarce resource that needs to be managed.
  • Traffic-shaping policies apply equally to both accelerated and unaccelerated traffic. For example, an accelerated XenApp connection and an unaccelerated XenApp connection both receive traffic shaping, so both can have an elevated priority compared to bulk traffic. As another example, time-sensitive non-TCP traffic, such as VoIP (which uses the UDP protocol) can be expedited.
  • Traffic shaping is applied to the WAN link in both the sending and receiving directions, to both accelerated and non-accelerated traffic. This feature prevents congestion and increased latency even when the other side of the link is not equipped with a CloudBridge appliance. For example, Internet downloads can be prioritized and managed.
  • The traffic-shaping policy for a service class can be specified on a per-link basis if desired.

In addition to shaping the traffic directly, the traffic shaper can affect it indirectly by setting the Differentiated Services Code Point (DSCP) field to inform downstream routers about the type of traffic shaping each packet requires.