Forum Discussion

dkinsler_23191's avatar
dkinsler_23191
Icon for Nimbostratus rankNimbostratus
Feb 15, 2010

fallback to different VIP in Irule??

Hello All,

 

I have been looking for a way to do this but I have not been able to find it. I am trying to select a completely different VIP when all the pool members are down. I have found the code to do the fallback host, but I need the URL to not to change in the users browser. I want the LB to choose a different VIP, but not show it to the client. The VIP's will have different persistance requirements. Any ideas?

3 Replies

  • If you want to select a second VIP to handle the request when a new request is parsed and the default pool is down, you can use something like:

     
     when HTTP_REQUEST { 
      
         Check if currently selected pool has no active members 
        if {[active_members [LB::server pool]] == 0}{ 
      
            Use the fallback VIP 
           virtual fallback_vip 
        } 
     } 
     

    Of for lower overhead, you could change from the HTTP_REQUEST to the CLIENT_ACCEPTED event. Then the check would only be done when a client establishes a new TCP connection to the VIP versus on each HTTP request.

    Aaron
  • Another, ultra lean and mean, option is to point your http profile to this virtual as a fallback host, which will have the same affect in many cases.

     

    -Matt
  • The issue with using the fallback host option is it results in a 302 redirect with the new URL being sent to the client. The client will see this change. dkinsler wanted a method that would be transparent to the client.

     

     

    Aaron