Forum Discussion
gc_33734
Nimbostratus
Jan 24, 2008Ratio load balancing syntax
I am not so sure this is an "advanced" question, but I was unable to find this answered specifically enough anywhere else.
I am using an f5
version: BIG-IP 9.4.3 Build 1.4 Final
I am in a situation where I need to use the console/command line interface to configure my load balancer. I have a user that wants a pool set up with 2 devices, load balanced with a weighted ratio of 75%-25%. I need to know the syntax for creating a pool with 2 members, one which will receive 75% of incoming connections, with the other member receiving 25%. Here is what I used to configure the BIGIP the way it is right now:
node 10.10.145.10 {
ratio 75
}
node 10.10.145.11 {
ratio 25
}
pool TestPool_10049 {
lb method member ratio
member 10.10.145.10:10049 ratio 75
member 10.10.145.11:10049 ratio 25
}
virtual TestPool_10049 {
destination 10.193.64.222:10049
pool TestPool_10049
}
If I am in the console/command line interface and I do a "show" on this pool I get:
POOL TestPool_10049 LB METHOD member ratio MIN/CUR ACTIVE MEMBERS: 0/0
| conns (cur, max, limit, tot) = (0, 2, 0, 10)
| (pkts,bits) in = (55, 28320), out = (50, 29040)
+-> POOL MEMBER TestPool_10049/10.10.145.10:10049 ACTIVE,UNCHECKED SESSIONS ENABLED
| | priority 1 ratio 75 dynamic ratio 1
| | conns (cur, max, limit, tot) = (0, 1, 0, 5)
| | (pkts,bits) in = (28, 14416), out = (25, 14520)
| | requests (total) = 5
+-> POOL MEMBER TestPool_10049/10.10.145.11:10049 ACTIVE,UNCHECKED SESSIONS ENABLED
| priority 1 ratio 25 dynamic ratio 1
| conns (cur, max, limit, tot) = (0, 1, 0, 5)
| (pkts,bits) in = (27, 13904), out = (25, 14520)
| requests (total) = 5
So I must be doing something wrong, since the connections are being sent 50/50 to each member of the pool. Please help me out, and remember that I only have the console/command line interface right now.
Thanks
- JRahm
Admin
Ratio works by distributing the connections round-robin to the pool members until the configured level is exceeded. In your case, you won't meet your desired goal of 75/25 until 100 connections. The ratio is a representation of connections, not percentage, so I would suggest changing your ratio from 75/25 to 3/1. - gc_33734
Nimbostratus
Hey thank you very much, it is working correctly now. I set the ratio to 3:1 for both the members of the pool, and the nodes. Is it required that I set both of these for it to work? Either way, I appreciate the fast help - thank you very much! - JRahm
Admin
That depends on the algorithm you selected, ratio(node) or ratio(member)? Typically, if the node (read, IP address) only has one service, I use member. But if I have several services running on each node, then I will use node load balancing. That way, regardless of what's happening within an applications distribution, the physical servers aren't out of balance. - adamcox_1480
Nimbostratus
I'm attempting to run the same setup but on a larger scale. I want to roll out a new application to a select % of people slowly ramping up the percentages. I have four boxes of version 1.0 and two boxes version 2. In order to setup a 5% to version 2 boxes I'm thinking - Hamish
Cirrocumulus
Not sure about your logic there for working out 5% of 400... The result should be closer to 22 (Once you added in the 2x 20's to get 440 for the total, 5% of that is 22), just as a quick does it feel right kind of check... - adamcox_1480
Nimbostratus
ok, so another way to approach it would be start with a grand total, lets say 100. Then divide that up to the appropriate percentages. - Hamish
Cirrocumulus
I didn't think that was the way the algorithm went... (i.e. two steps). But then the actual implementation is going to be secret anyway... - hoolio
Cirrostratus
I think it should be round robin between members of the same ratio. You could test this by using ratio load balancing with each pool member set to a ratio of 1. Note that this isn't a recommended config for doing ratio as there is more overhead with ratio (even with even ratios) than using round robin. - adamcox_1480
Nimbostratus
Thank you all for your help. I'm trying to roll out this next version and being able to do it in a % ramp up process to be able to tune and tweak. I figured my options were two pools or ratio weights.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects