Algorithms for making load-balancing decisions
Load balancer groups use algorithms to make load-balancing decisions. The decision determines to which remote server to forward a new connection.
A weighted algorithm uses weight (or preference) to help determine which server receives the next request. A server with a higher weight receives more traffic than one with a lower weight. The percentage of traffic to each server is approximately equal to its weight divided by the cumulative weight of all servers in the group.
A non-weighted algorithm assumes that the capacity of all servers in the group to be equivalent. Although non-weighted algorithms are typically faster than weighted algorithms, some non-weighted algorithms, such as the hash algorithm, can send more traffic to some servers. If there are servers with different capacities in the group, processing cannot optimize the capacities of all the servers.
- The primary server is the first server in the members list.
- Backup servers are any subsequent server in the members list.
When the health state of the primary server is
the DataPower® service
forwards all connections to this server. When the health state of
the primary server is
the DataPower service
forwards connections to the next server in the list.
The hash algorithm uses the IP address of the client or the value of an HTTP header as the basis for server selection.
- Multi-Protocol Gateway
- Web Service Proxy
With the hash algorithm, the same client is served by the same server. Use this algorithm only when clients access applications that require the storage of server-side state information, such as cookies. Hashing algorithms cannot ensure even distribution.
The least connections algorithm maintains a record of active server connections and forward a new connection to the server with the least number of active connections.
The round robin algorithm maintains a list of servers and forwards a new connection to the next server in the members list.
Weighted least connections
- Its proportion to the weight or preference
- Its number of active connections
This algorithm uses more computation times than the least connection algorithm. However, the additional computation results in distributing the traffic more efficiently to the server that is most capable of handling the request.
This algorithm applies to application servers, not to authentication or authorization servers, and requires the Application Optimization feature.
Weighted round robin
The weighted round robin algorithm maintains a weighted list of servers and forwards new connections in proportion to the weight, or preference, of each server.
This algorithm uses more computation times than the round robin algorithm. However, the additional computation results in distributing the traffic more efficiently to the server that is most capable of handling the request.