Forum Discussion

Nat_Thirasuttakorn's avatar
Nov 29, 2004

what is iRule command to handle "no response" or "timeout" ?

is there any iRule command to handle "no response" or "timeout" either from client side or server side?

 

 

Thanks in advance.
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    I'm not completely sure what you mean by "no response". I think by "no response" you are meaning a hung or otherwise idle connection.

    Currently, there is not a specific event that is used when reaping a connection due to it's idle timeout. We'll consider this for a future release.

    However, there is a CLIENT_CLOSED event that could be used with some variables and/or the IP::stats command to potentially handle the "no response" case.

    For example:

      
      rule unresponsive {  
         when CLIENT_ACCEPTED {  
            set got_response 0  
         }  
         when HTTP_RESPONSE {  
            set got_response 1  
         }  
         when CLIENT_CLOSED {  
            if { not $got_response } {  
               log "No server response on client [IP::remote_addr][TCP::remote_port] -> [IP::local_addr][TCP::local_port]"  
            }  
         }  
      }  
      

    The IP::stats command can be used to determine whether the connection has received packets and/or the age of the connection. However, this command does not return the amount of time the connection is "idle".

    Hope this helps, and thanks for the ideas.