cc/td/doc/product/iaabu/localdir/ld16rns
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Load Balancing Options

Load Balancing Options

The predictor command options and the maxconns command allow you to optimize the response curve of the entire system. These options are described in the following sections:

Least Connections

The leastconns predictor option directs network connections to the server with the least number of open connections. Although it may not be intuitively obvious that the leastconns predictor would provide effective load balancing; in fact, it does quite well. At web sites where there is a collection of servers with similar performance, the leastconns option is effective in smoothing distribution in situations where a server gets bogged down for one reason or another. In sites where there are large differences in the capacity of various servers, the leastconns option also performs very well. In maintaining the same amount of connections to all servers, those capable of processing (and thus terminating) connections the fastest will get more connections over time. A server deemed to be twice as powerful as another server does, in fact, get about twice as many connections per second.

Weighted Percentage

The weighted predictor option allows you to assign a performance weight to each server. Weighted load balancing is similar to leastconns, but servers with a higher weight value will receive a larger percentage of connections at any one time. LocalDirector administrators can assign a weight to each real server, and the LocalDirector will use this weight to determine the percentage of the current number of connections to give each server. The default weight is one.

For example, in a configuration with 5 servers, the percentage of connections is calculated as follows:

weight server1 7
weight server2 8
weight server3 2
weight server4 2
weight server5 5
total weight of all servers = 24

This will result in server1 getting 7/24 of the current number of connections, server2 getting 8/24, server3 getting 2/24, etc. If a new server, server6, is added with a weight of 10, it will get 10/34, and so on. Thus, the weighted option allows an administrator to fine tune LocalDirector load balancing for the web site.


Note The weight command is used to set the weight values for the real servers, and the predictor command is used to set load balancing to the weighted option.

Round Robin

The roundrobin predictor option directs the network connection to the next server, and treats all servers as equals regardless of number of connections or response time. Although the LocalDirector roundrobin predictor appears similar to DNS round robin, it is superior because there is no propagation delay or caching that will hinder the algorithm. Also, the LocalDirector can determine when a server is not responding, and avoid sending connections to that server.

Fastest

The fastest predictor option directs the network connection to the server with the fastest response rate, although it does not perform consistently in varying server configurations. Web-server performance, in particular, does not follow a linear progression of response time to number of connections. Web servers seem to respond flatly to a point, and then at a certain load there is a sharp, dramatic increase in the response time. In these situations, the fastest predictor will tend to overload a particular server before moving on to another.

Maximum Connections

Use the maxconns command to specify the maximum number of connections for each real server. By setting a limit to the maximum connections that a server will accept, you can avoid exceeding the capacity threshold of the server.

hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1998 © Cisco Systems Inc.