Forum Discussion
Shay_Ben-David1
Nimbostratus
Oct 15, 2008redirect based on pool member status
i am looking for an irule that will redirects base on the pool member status, meaning that if less than 3 member is availble on this pool it will redirects.
thanks
hoolio
Cirrostratus
Oct 15, 2008Hi Shay,
You can use active active_members $pool_name to get a count of the active members:
when HTTP_REQUEST {
Check if there are more than x members marked up in the default pool
if {[active members [LB::server pool]] < 3}{
HTTP::respond 302 "Location" "http://redirected.example.com/busy" \
"Connection" "Close" \
"Cache-Control" "no-cache" \
"Pragma" "no-cache"
}
}
LB::server (Click here)
active_members (Click here)
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
