Forum Discussion

sathish_126179's avatar
sathish_126179
Icon for Nimbostratus rankNimbostratus
Jul 18, 2014

iRule for pool member reselect

Hello F5Admins,

 

We are using LTM 11.3.0. One of our website running in IIS has lot of Application pools and whenever any of these pools goes down returns 503 http response code. Our requirement is whenever a response code of 503 occurs due to App pool failures, LB should route such request to the next available pool member without marking that pool member offline (since marking down will affect connections in other app pools). Though we are able to reselect a new pool member with this irule, it works only if the pool member is marked down.

 

when HTTP_REQUEST { set my_host_header [HTTP::host] set my_uri_header [HTTP::uri] }

 

when HTTP_RESPONSE { if { [HTTP::status] contains "503"} { catch { LB::down } HTTP::redirect "https://$my_host_header$my_uri_header" } }

 

Any idea how to achieve this without the "LB:Down" statement. Any help on this will be highly appreciated.

 

Thanks Sathish

 

2 Replies

  • Hi Santhish,

    You could do something like the following

    when LB_FAILED {
             LB::reselect pool 
    }
    

    I hope this helps

    -=Bhattman=-

  • Hi Bhattman

     

    Thanks for your reply. I had tried this but unfortunately the LB_FAILED event gets triggered only when the server/IP address entirely goes down. This doesn't work for IIS AppPool failures

     

    Thanks Sathish