Forum Discussion
Matt_Breedlove_
Nimbostratus
Apr 18, 2009Feedback on multi-pool irule
Please provide some feed back on this irule which is mean to relativley evenly distribute inbound traffic thgrough a single VS across 2 pools of servers depending on which pool has more active members...
Matt_Breedlove_
Nimbostratus
Apr 19, 2009Posted By mattbreedlove on 04/17/2009 11:41 PM
Please provide some feed back on this irule (below) which is meant to relatively evenly distribute inbound traffic through a single virtual server across 2 or more pools of servers depending on which pool has more active members compared to the other. If both pools have 0 active members or LB_Failed then the connection is sent to a third apology page pool.
Long term idea is to scale this up to several pools of servers. Each pool contains groups of servers with specific horsepower quotients.
By using good ecv monitors we expect this irule should auto adjust connection load across pools based on strength of pool health by looking at active members.
Each individual pool itself will use round robin internally.
There are two "HTTP_REQUEST" blocks below. Which is more efficient?
Should a switch statement be used? This will be used on a very busy site which is why I wanted to stear clear of anything intensive like regex or enc/dec stuff
Is there a better method to do this?
when HTTP_REQUEST {
if { [active_members pool_a] > [active_members pool_b] } {
if { [active_members pool_a] = 0 } {
pool pool_sorry
} else {
pool pool_a
}
} else {
if { [active_members pool_b] = 0 } {
pool pool_sorry
} else {
pool pool_b
}
}
}
when LB_FAILED {
pool pool_sorry
}
when HTTP_REQUEST {
if { [active_members pool_a] > [active_members pool_b] } {
pool pool_a
} else {
pool pool_b
}
}
when LB_FAILED {
pool pool_sorry
}
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