Forum Discussion
JSpartan0901_95
Feb 21, 2012Nimbostratus
Hybrid load balancing algorithm
Hi,
Is there any hybrid load balancing algorithm i.e., I would like a member in the pool to process a fixed percentage of requests and other members should use least connection count algorithm.
For example, if I have a pool of 4 members - host1, host2, host3 and host4. I want host4 to always process 10% of requests and the other three hosts should process remaining 90% of requests with least connection count algorithm.
If yes, how can I configure it?
Thanks!
-JS
2 Replies
Sort By
- Probably with an irule. You get complete control then. Use a table to count and assign the pollmember appropriately. Although member weightings might get close.
- 200.200.200.222 is a fake pool member (not existing). this only works with round robin lb method. when using ratio lb method and giving 200.200.200.222 ratio 2, connection gets stuck with it which is finally sent to 200.200.200.111. i guess counter (ratio) might have some problem when doing LB::reselect.
[root@ve1023:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.79:80 ip protocol 6 rules myrule } [root@ve1023:Active] config b pool foo list pool foo { members { 200.200.200.101:80 {} 200.200.200.222:80 {} } } [root@ve1023:Active] config b pool foo111 list pool foo111 { members 200.200.200.111:80 {} } [root@ve1023:Active] config b rule myrule list rule myrule { when LB_SELECTED { if {[IP::addr [LB::server addr] equals 200.200.200.222]}{ LB::reselect pool foo111 } } when SERVER_CONNECTED { log local0. "[IP::client_addr]:[TCP::client_port] -> [IP::local_addr clientside]:[TCP::local_port clientside] -> [IP::remote_addr]:[TCP::remote_port]" } } [root@ve1023:Active] config cat /var/log/ltm Feb 23 05:59:11 local/tmm info tmm[4797]: Rule myrule : 172.28.19.251:46204 -> 172.28.19.79:80 -> 200.200.200.111:80 Feb 23 05:59:13 local/tmm info tmm[4797]: Rule myrule : 172.28.19.251:46205 -> 172.28.19.79:80 -> 200.200.200.101:80 Feb 23 05:59:16 local/tmm info tmm[4797]: Rule myrule : 172.28.19.251:46206 -> 172.28.19.79:80 -> 200.200.200.111:80 Feb 23 05:59:17 local/tmm info tmm[4797]: Rule myrule : 172.28.19.251:46207 -> 172.28.19.79:80 -> 200.200.200.101:80
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