Forum Discussion
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
- Pragathishakart
Nimbostratus
Surelt it can be done using iRule.
- Pragathishakart
Nimbostratus
Please ignore the above comment.
- Pragathishakart
Nimbostratus
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
- Pragathishakart
Nimbostratus
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?
- Arun_02_139047
Nimbostratus
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!
- Arun_02_139047
Nimbostratus
please note: this is for load-balancing tcp profile pools. And all the pools are identical.
- Arun_02_139047
Nimbostratus
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
Cirrus
what type of persistence are used by the applications? are they all equal?
- John_Alam_45640Historic 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.
to increment and lookup use:
set active_connections [table incr "connections"] if {...} when CLIENT_CLOSED { table incr "connections" -1 }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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