Product Documentation

Assigning Weights to Services

Nov 12, 2013

In a load balancing configuration, you assign weights to services to indicate the percentage of traffic that should be sent to each service. Services with higher weights can handle more requests; services with lower weights can handle fewer requests. Assigning weights to services allows the NetScaler appliance to determine how much traffic each load balanced server can handle, and therefore more effectively balance load.

Note: If you use a load balancing method that supports weighting of services (for example, the round robin method), you can assign a weight to the service.

The following table describes the load balancing methods that support weighting, and briefly describes the manner in which weighting affects how a service is selected for each one.

Load Balancing Methods

Service Selection with Weights

Round Robin

The virtual server prioritizes the queue of available services such that services with the highest weights come to the front of the queue more frequently than those with the lowest weights and receive proportionately more traffic. For a complete description, see The Round Robin Method.

Least Connection

The virtual server selects the service with the best combination of fewest active transactions and highest weight. For a complete description, see The Least Connection Method.

Least Response Time and Least Response Time Method using Monitors

The virtual server selects the service with the best combination of fewest active transactions and fastest average response time. For a complete description, see The Least Response Time Method.

Least Bandwidth

The virtual server selects the service with the best combination of least traffic and highest bandwidth. For a complete description, see The Least Bandwidth Method.

Least Packets

The virtual server selects the service with the best combination of fewest packets and highest weight. For a complete description, see The Least Packets Method.

Custom Load

The virtual server selects the service with the best combination of lowest load and highest weight. For a complete description, see The Custom Load Method.

Hashing methods and Token method

Weighting is not supported by these load balancing methods.

To configure a virtual server to assign weights to services by using the command line interface

At the command prompt, type:

set lb vserver <name> -weight <Value> <ServiceName>

Example

set lb vserver Vserver-LB-1 -weight 10 Service-HTTP-1

To configure a virtual server to assign weights to services by using the configuration utility

  1. Navigate to Traffic Management > Load Balancing > Virtual Servers.
  2. Open the virtual server, and then click in the Services section.
  3. In the weight column for the service, assign a weight to the service.