Forum Discussion
rob_carr
Mar 22, 2011Cirrostratus
When a connection comes to a virtual server where persistence has been enabled, the connection is first evaluated to determine if the LTM has a valid persistence record for that connection. If the LTM does not, then the connection is load-balanced according to the method chosen for the pool.
Thus, even though your pool members have a ratio of 2:1, assuming that some of your clients return within the persistence timeout, you will see that your actual ratio of connections is not 2:1. A couple of examples:
Example 1: three clients, two pool members, ratio of connections is 2:1 in favor of 1st pool member, no persistence enabled.
1st client makes connection, is load-balanced to 1st pool member.
2nd client makes connection, is load-balanced to 2nd pool member.
3rd client makes connection, is load-balanced to 1st pool member. (because of ratio)
You get a clear 2:1 ratio out of that and a repeating load-balancing pattern of 1-2-1.
Example 2: three clients (each of which is in a different /24 network), two pool members, ratio of connections is 2:1 in favor of 1st pool member, source address persistence and a /24 mask are configured.
1st client makes connection, is load-balanced to 1st pool member.
2nd client makes connection, is load-balanced to 2nd pool member.
3rd client makes connection, is load-balanced to 1st pool member. (because of ratio)
1st client makes connection, returns to 1st pool member (because of persistence)
3rd client makes connection, returns to 1st pool member (because of persistence)
Now the ratio looks more like 5:1, and this is caused by persistence behavior as expected.
I'm not sure it's worth it to try and prove this, but you could collect all of your web server logs, parse them to remove connections from clients that are returning to the same server within the persistence timeout period, then compare the count of remaining sessions. You would probably see something much closer to the ratio you configured on the pool.