Forum Discussion
Jose_Figueroa_4
Nimbostratus
Nov 25, 2008two pool ratio configuration?
Greetings,
Is there a way that I can have two pools and have ratio configuration? I need to load balancing two pools consisting of mail servers on both pools behind 1 virtual server. I would like distribute 80% of traffic to pool_1 and 20% to the other pool_2.
Any help will be greatly appreciated
Regards,
--JF
4 Replies
- hoolio
Cirrostratus
Hi there,
You could do this with an iRule, but I think it would be easier and more efficient to use ratio load balancing in a single pool. You could set the ratio on the members you want to receive 80% of traffic to 4 and the ratio of members you want to receive 20% to 1. This would also allow you to use a single persistence profile to ensure requests from the same client are sent to the same pool member.
You can get more information on ratio load balancing in the LTM config guide for your version:
LTM 9.3 Config Guide
https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/bigip9_3config/BIG_IP_LTM_9_3_Config_Guide-05-1.html
Ratio (member) and Ratio (node)
The BIG-IP system distributes connections among machines according to ratio weights that you define, where the number of connections that each machine receives over time is proportionate to a ratio weight you define for each machine. These are static load balancing methods, basing distribution on static user-assigned ratio weights that are proportional to the capacity of the servers. Regarding Ratio load balancing:
Load balancing calculations may be localized to each pool (member-based calculation) or they may apply to all pools of which a server is a member (node-based calculation). This distinction is especially important with the Ratio method; with the Ratio (member) method, the actual ratio weight is a member setting in the pool definition, whereas with the Ratio (node) method, the ratio weight is a setting of the node.
The default ratio setting for any node is 1. If you use the Ratio (as opposed to Ratio (member) load balancing method, you must set a ratio other than 1 for at least one node in the configuration. If you do not change at least one ratio setting, the load balancing method has the same effect as the Round Robin load balancing method.
Warning: If you set the load balancing method to Ratio (node), as opposed to Ratio (Member), you must define a ratio setting for each node.
Aaron - Jose_Figueroa_4
Nimbostratus
Thank you Aaron.
We need to have two pool ratio lb for certain reasons. I was provided the following irule but it is not working, any ideas?
•Pool ratio configuration
As discussed, the best way to do this is with a pool populated with two "dummy" IP addresses. These addresses can be used within an iRule as tokens to select the appropriate destination pool. This allows us to use BIG-IPs native LB engine, and is very lightweight and supportable. Configuration example below.
Pool ratio configuration
virtual dual_pool_mail_vip {
pool dual_pool_mail_pool
destination 10.1.2.3:smtp
ip protocol tcp
rules dual_pool_mail_rule
}
pool dual_pool_mail_pool {
lb method member ratio
members
1.2.3.4:smtp
ratio 80
5.6.7.8:smtp
ratio 20
}
rule dual_pool_mail_rule {
when LB_SELECTED {
LB::reselect
pool dual_pool_mail_[LB::server addr]
}
}
pool dual_pool_mail_1.2.3.4 {
members
1.0.0.1:smtp
1.0.0.2:smtp
1.0.0.3:smtp
1.0.0.4:smtp
1.0.0.5:smtp
}
pool dual_pool_mail_5.6.7.8 {
members
2.0.0.1:smtp
2.0.0.2:smtp
} - hoolio
Cirrostratus
That's a novel approach. Out of curiosity, where did you get it from?
When you say it's not working, what do you see when you test it? Do you see the request making it to the VIP, any errors in /var/log/ltm, ARP for the dummy IP's or the actual server IP's, the request being sent to the actual server IP's, etc?
Aaron - dannyk81_365606
Nimbostratus
Is this solution still valid, I tried implementing it and for some reason LB::select picks only one of the dummy nodes and seems to ignore the ratios I defined.
-- Danny
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
