Forum Discussion

jschilen's avatar
jschilen
Icon for Nimbostratus rankNimbostratus
Dec 08, 2006

send redirect if no pool memebers available

Hello,

 

 

In our environment we have a portal which has the capability to single signon a user to many of our other systems. What we'd like to do is redirect all login pages for the other systems to the portal unless the portal is down. I have figured out how to do this with version 9 iRules but don't see the same abilities in the 4.5.

 

 

Is it possible to check the number of pool members in an iRule in 4.5?

 

 

Here's the v9 code:

 

 

when HTTP_REQUEST {

 

 

if { [HTTP::uri] ends_with "ksuvista" } {

 

if { [active_members "flashline.kent.edu_636"] > 0 }{

 

HTTP::redirect "http://flashline.kent.edu/"

 

}

 

}

 

}

 

 

Thanks,

 

 

Jeremiah
  • Martin_Machacek's avatar
    Martin_Machacek
    Historic F5 Account
    Unfortunately v4.x iRules do not allow to check number of available members in a pool. However, you may be able to achieve you goal by defining a fallback URL in your pool which makes the BIG-IP issue a redirect if all no pool members are available. The redirect will have to point to a virtual that sends where you need to go if no there are no members available in the "flashline.kent.edu_636" pool. So, the entire process will require 2 redirect in case of no available pool members. One form the front-end virtual to the portal and possibly a second one from the portal to another version of the frontend (this time without the redirect) if no portal servers are available.