Forum Discussion

JSpartan0901_95's avatar
Icon for Nimbostratus rankNimbostratus
Feb 21, 2012

Hybrid load balancing algorithm




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?








2 Replies

  • Hamish's avatar
    Icon for Cirrocumulus rankCirrocumulus
    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.
  • is a fake pool member (not existing). this only works with round robin lb method. when using ratio lb method and giving ratio 2, connection gets stuck with it which is finally sent to 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
       ip protocol 6
       rules myrule
    [root@ve1023:Active] config  b pool foo list
    pool foo {
       members {
    [root@ve1023:Active] config  b pool foo111 list
    pool foo111 {
       members {}
    [root@ve1023:Active] config  b rule myrule list
    rule myrule {
       when LB_SELECTED {
       if {[IP::addr [LB::server addr] equals]}{
          LB::reselect pool foo111
       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 : -> ->
    Feb 23 05:59:13 local/tmm info tmm[4797]: Rule myrule : -> ->
    Feb 23 05:59:16 local/tmm info tmm[4797]: Rule myrule : -> ->
    Feb 23 05:59:17 local/tmm info tmm[4797]: Rule myrule : -> ->