Forum Discussion

Noppadon_Panyar's avatar
Noppadon_Panyar
Icon for Nimbostratus rankNimbostratus
Jan 19, 2007

404 error during 5mins monitoring gap

i having the problem with 404 error response from server during the 5 miniutes monitoring gap.

How can i re-load balance the request to other nodes in the same pool?

I've searched in the forum and found some rule that talked about http redirection but it's not exactly what i want.

Here's is a rule that i defined:

when HTTP_REQUEST {
   if { [string tolower [HTTP::host]] equals "www.abc.com" }
        { log "go to [HTTP::host]"
          if {[HTTP::uri] contains "secure"
        }
         { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
         log "client [IP::client_addr] redirected to: https://[getfield [HTTP::host] ":" 1][HTTP::uri]"
         }
            else {
               pool abc_pool
                  }
                 }
   if { [string tolower [HTTP::host]] equals "www.test1.com"}
      { log "go to [HTTP::host]"
      pool test1_pool}
   if { [string tolower [HTTP::host]] equals "www.test2.com"}
      { log "go to [HTTP::host]"
      pool test2_pool}
   if { [string tolower [HTTP::host]] equals "www.test3.com"}
      { log "go to [HTTP::host]"
      pool test3_pool}
   if { [string tolower [HTTP::host]] equals "wap.abc.com"}
      { log "go to [HTTP::host]"
      pool wap_abc_pool}
}
when LB_FAILED {
      persist none
}
when HTTP_RESPONSE {
      if { [HTTP::status] contains "500" or [HTTP::status] contains "404"}
         {
       HTTP::redirect http://[getfield [HTTP::host] ":" 1]
         }
}

thanks in advance for any suggestions.

North
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    The command to re-load balance a connection is LB::reselect, but you'll likely need to use LB::detach first, since the BIG-IP will have already connected to the server. There are a few decent examples of this in the forums if you search, and a good example in the Wiki as well here Click here

     

     

    HTH,

     

    Colin