Forum Discussion

ltp_55848's avatar
ltp_55848
Icon for Nimbostratus rankNimbostratus
Mar 15, 2011

HTTP commands and LB_FAILED event not working for fasthttp profile

Hi All,

 

 

Apologies if this is an oft-repeated question on the forums, but after some searching both here and on Google I've been unable to find a definitive answer.

 

 

I am using a wideip that provides a sorry service page for the fallback host in the default http profile so that any new virtual created using the http profile automatically inherit this configuration. This is so far working well and means that others do not necessarily have to worry about setting a fallback or sorry server iRule for any new virtual hosts created using the http class.

 

 

For FastHTTP profiles however, there doesn't appear to be a way in which to specify a default fallback server. To work around this, I've attempted to create an iRule to be used on all virtual servers using a fasthttp profile but am finding that the HTTP::fallback command and the LB_FAILED command don't appear to be working as expected. For example the following iRule:

 

 

when LB_FAILED {

 

log local0. "Redirecting to sorry server"

 

}

 

 

Fails to generate a log message when all members in the pool have been marked down. Adding the following to the start of the iRule produces a single log entry.

 

 

when HTTP_REQUEST {

 

log local0. "Redirecting to sorry server"

 

}

 

 

However, if the rule is associated to a virtual server using a fasthttp profile, amending the former section to the following generates the error: "HTTP::fallback in rule (Rule_Name) requires an associated HTTP profile on the virtual server (virtual_server_name)."

 

 

when LB_FAILED {

 

log local0. "Redirecting to sorry server"

 

HTTP::fallback "http://sorry.global.domain.com"

 

}

 

 

After much searching it seems that there was a bug fixed with the LB_FAILED event in version 9, but I'm currently on 10.2.1. I think I can understand if the HTTP::fallback would only be available to virtual servers using the http profile, but I can't find this explicitly documented anywhere (my search-fu is weak and I'm tired). So; is there any way in which to specify a global fallback host for all virtual servers regardless of profile? or failing that; is there any way in which to specify a fallback host for a fasthttp profile, or otherwise use iRules as above to accomplish the same per virtual server?

 

 

If I'm missing something obvious here feel free to point out the error of my ways.

 

3 Replies

  • https://support.f5.com/kb/en-us/solutions/public/0000/sol8024.html

     

     

    I'm assuming HTTP::fallback is one of the features that simply can't be used from fastHTTP. Out of curiosity - is there a reason you're using the FastHTTP profile and not just a Standard HTTP VIP with similar optimization features?
  • Steve_Scott_873's avatar
    Steve_Scott_873
    Historic F5 Account
    Seem to get the same problem when I try and write an iRule to provide any response without the HTTP parser / profile turned on - you can put as many collect, response and pool statements in there as you like and it'll still respond with a TCP-RST
  • Yeah, the idea behind the FastHttp profile is that it offers better performance at a cost of functionality. In practice, I haven't seen it used in production much.

     

     

    Aaron