Configuring Server Load Balancing

IOS SLB Functions and Capabilities

SynGuard

Dynamic Feedback Protocol for IOS SLB

Alternate IP Addresses

Transparent Web Cache Balancing

NAT

Redundancy Enhancement—Stateless Backup

Algorithms for Server Load Balancing

IOS SLB provides two load-balancing algorithms: weighted round robin and weighted least connections. You may specify either algorithm as the basis for choosing a real server for each new connection request that arrives at the virtual server.

Weighted Round Robin

The weighted round robin algorithm specifies that the real server used for a new connection to the virtual server is chosen from the server farm in a circular fashion. Each real server is assigned a weight, n, that represents its capacity to handle connections, as compared to the other real servers associated with the virtual server. That is, new connections are assigned to a given real server n times before the next real server in the server farm is chosen.

For example, assume a server farm comprises real server ServerA with n = 3, ServerB with n = 1, and ServerC with n = 2. The first three connections to the virtual server are assigned to ServerA, the fourth connection to ServerB, and the fifth and sixth connections to ServerC.

Note Assigning a weight of n = 1 to all of the servers in the server farm configures the IOS SLB switch to use a simple round robin algorithm.

Weighted Least Connections

The weighted least connections algorithm specifies that the next real server chosen from a server farm for a new connection to the virtual server is the server with the fewest number of active connections. Each real server is assigned a weight for this algorithm also. When weights are assigned, the server with the fewest number of connections is based on the number of active connections on each server, and on the relative capacity of each server. The capacity of a given real server is calculated as the assigned weight of that server divided by the sum of the assigned weights of all of the real servers associated with that virtual server, or n1/(n1 + n2 + n3...).

For example, assume a server farm comprises real server ServerA with n = 3, ServerB with n = 1, and ServerC with n = 2. ServerA would have a calculated capacity of 3/(3 + 1 + 2), or half of all active connections on the virtual server, ServerB one-sixth of all active connections, and ServerC one-third of all active connections. At any point in time, the next connection to the virtual server would be assigned to the real server whose number of active connections is farthest below its calculated capacity.

Note Assigning a weight of n = 1 to all of the servers in the server farm configures the IOS SLB switch to use a simple least-connection algorithm.

Cisco IOS IP Configuration Guide

IPC-135

Page 181
Image 181
Cisco Systems 78-11741-02 Algorithms for Server Load Balancing, Weighted Round Robin, Weighted Least Connections, IPC-135