F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Arun_02_139047's avatar
Arun_02_139047
Icon for Nimbostratus rankNimbostratus
Jan 09, 2014

Load Balancing Multiple pool members

Hello -

 

I am looking to create multiple pools with a one-to-one mapping between pool and my application cluster. I want to load balance these pools in a round robin fashion. I dont know if i can use iRule for this objective.

 

Please advise.

 

Thanks!

 

9 Replies

  • Check the below link to implement how you like to get on

     

    https://devcentral.f5.com/articles/irules-101-05-selecting-pools-pool-members-and-nodes

     

  • You can distribute traffic to different pools for specific url or uri s. Do you wish just wish to distribute requests among the pools in round-robin manner?

     

  • Hello -

     

    My requirement is to create three pools - pool0, pool1 and pool2. All these pools go under one virtual server IP. (In virtual server configuration, there is only default app pool drop down).

     

    Under each pool (pool0, pool1 and pool2) there are three nodes - node0, node1 and node2.

     

    I come from a citrix world where i can configure this as three servicegroups under a vserver. I cannot seem to find how to implement this in F5.

     

    Thanks!

     

  • please note: this is for load-balancing tcp profile pools. And all the pools are identical.

     

  • I think I came up with something 🙂 Please suggest what you think.

    when RULE_INIT {
      set ::active_connections 0
    }
    
    when CLIENT_ACCEPTED {
      if {$::active_connections % 3==0) then {
         incr ::active_connections 1
         pool pool0
      } elseif {$::active_connections % 3==1) then {
         incr ::active_connections 1
         pool pool1
      } elseif {$::active_connections % 3==2) then {
         incr ::active_connections 1
         pool pool2
      }
    }
    
    when CLIENT_CLOSED {
      incr ::active_connections -1
    }
    
    • Torti's avatar
      Torti
      Icon for Cirrus rankCirrus
      what type of persistence are used by the applications? are they all equal?
  • John_Alam_45640's avatar
    John_Alam_45640
    Historic F5 Account

    By using a non static global variable (in RULE_INIT), you have demoted your virtual to run on only one CPU. In other words, you have disabled "Clustered Multi Processing (CMP)" for that virtual.

    Try using "table incr" and "table lookup" commands instead.

    iRule table commands

    to increment and lookup use:

        set active_connections [table incr "connections"]
        if {...}
    
    
    when CLIENT_CLOSED {
      table incr "connections" -1
    }