IBM


15.3.1 Server affinity

Server affinity allows load balancing for those applications that need to preserve state across distinct connections from a client. If server affinity is not enabled in the Load Balancer, the Dispatcher routes the traffic according to server weights. There are several ways for the Dispatcher to maintain server affinity:

Stickiness to source IP address

Cross port affinity

Passive cookie affinity

Active cookie affinity

URI affinity

SSL session ID

The easiest way to configure the server affinity is by configuring the clustered port to be sticky. Configuring a cluster port to be sticky allows subsequent client requests to be directed to the same server - until the timeout expires for binding the source IP address and server port. See Chapter 4, "Introduction to WebSphere Edge Components" in IBM WebSphere V6 Scalability and Performance Handbook, SG24-6392 for more information about these options.

Depending on your WebSphere environment you should or should not enable server affinity at the Load Balancer level. Some possible scenarios and their impact on server affinity at the Load Balancer are: - One Load Balancer with multiple Web servers behind it. Multiple appservers behind the Web servers and every Web server is connected to every appserver (See Scenario 1).

- One Load Balancer, multiple Web servers and multiple appservers. Each Web server however is connected to only some of the appservers, not all of them (See Scenario 2).

- Multiple Load Balancers, multiple Web servers and multiple appservers. Every Web server is connected to every appserver. The workload between the two or more Load Balancers is distributed via DNS round-robin (See Scenario 3).

- Multiple Load Balancers, multiple Web servers and multiple appservers. This time, however, every Web server is only connected to a certain number of appservers (See Scenario 4).

All of the Load Balancers in these scenarios should be configured with a backup Load Balancer. However, for simplicity reasons, we do not discuss the backup Load Balancer here.

Now what happens with sessions in each of these scenarios? Because you already have session affinity in the Web server plug-in, how should server affinity be configured in the Load Balancer?


Redbooks ibm.com/redbooks

Next