Forum Discussion
paul_adomeit_70
Nimbostratus
Sep 28, 2006Round Robin two pools
We were asked to balance four servers in a pretty unique way. The way to make it behave like it was requested would be to create two pools with all four members but have different priorities assigned so that for any one pool, only one server would be selected and only two total severs at a time would take traffic. We've written some pretty scarry iRules but I'm not sure how to write a rule that just round robin's two pools without looking for something first. Two VIP's is not an option, a single pool with priority activation would not work. We could make this happen by querying the node status's and build our logic around that but we like simple. Any simple ideas?
-p
- Something like this should do the trick...
when RULE_INIT { set ::NEXT_POOL 0 } when CLIENT_ACCEPTED { if { $::NEXT_POOL == 0 } { pool pool_a set ::NEXT_POOL 1 } else { pool pool_b set ::NEXT_POOL 0 } }
- paul_adomeit_70
Nimbostratus
Joe, - Gerardo_Garcia_
Nimbostratus
What do I need to do If I need to stay with the same pool that you started? - hoolio
Cirrostratus
You would want to add persistence in the rule. One option is to use cookie insert based on the pool selected. Here is an example: (Click here)
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