Forum Discussion
pool selection
Hi, is it poossible to implement irule logic below?
By default traffic select Pool1, but it select Pool2 if online pool members of Pool1 below two. If all pool members became available in Pool1, traffic will continue select Pool2.
I think the iRule below fill meet your requirements.
when CLIENT_ACCEPTED { set pri_pool "/Common/pool_a" set sec_pool "/Common/pool_b" if {[table lookup active_pool] ne ""} { if { [active_members [table lookup active_pool]] >= 2 } { } elseif { $active_pool eq $pri_pool } { table replace active_pool $sec_pool indefinite } else { table replace active_pool $pri_pool indefinite } } else { table set active_pool $pri_pool indefinite } pool [table lookup active_pool] }
Have fun,
--Niels
_Dmi_ You can do this with priority group activation in 1 pool rather than having 2 different pools.
- _Dmi_Altostratus
I cant use it. The full scenario is
By default traffic select Pool1, but it select Pool2 if online pool members of Pool1 below two. If all pool members became available in Pool1, traffic will continue select Pool2. But then online pool members of Pool2 below two, traffic must come back to Pool1.
Hii
You can try this
when HTTP_REQUEST {
set pool_a_members [LB::pool pool_a members]
if { [llength $pool_a_members] > 0 } {
pool pool_a
} else {
pool pool_b
}
}or check this post similar
Best Regard
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