Forum Discussion

strongarm_46960's avatar
strongarm_46960
Icon for Nimbostratus rankNimbostratus
Dec 12, 2008

HTML apology based tcp timeout

 

Looking at the “oneconnect” tcp setting & “tcp settings in profiles”, I am having some difficulty in choosing which TCP timeout value would dictate when my iRule generated apology HTML (during all pool failure) page would be displayed at a specified timeout value.

 

 

I have to make sure that this HTML page will be displayed only if and after the client sends out the initial HTTP request to the website, and if 100 seconds elapses and no response page was received, then the apology page *must* be displayed to the user independent of the performance driven oneconnect properties.

 

 

 

Which tcp timeout value setting would control this requirement?

 

 

 

The criterion for delivering this apology page will not only be based on status code received from the backend, it should also be based on a timeout value of 100secs, for cases when no status code is sent but clients time is being expended.

 

3 Replies

  • Hi there,

     

     

    It sounds like you want to trigger the maintenance response if a server responds with a bad status code or if LTM can't connect to the selected pool member. If so, you could add logic to the LB_FAILED event to trigger the response. The LB_FAILED event wiki page (Click here) details the logic for how long it takes to trigger the LB_FAILED event.

     

     

    Aaron
  • Actually, I am specifically referring to Layer-7, assuming the user has already established his connection in the LTM TCP table, so assume the 3way handshake is already done, now, what I want is to be able to set the timeout on the Layer 7 so that if the requested page is not returned within 100 second.

     

     

     

    This example you gave here assumes the client is making his first TCP connection in order to retrieve the page, what I want to do is to set the timeout if the user does not receive a status code 200 for a resource within 100sec, then the Apology page must be called.

     

     

    Thanks
  • In 10.x, iRules should support the 'after' command (man page Click here). I could see you implementing your logic by setting a timer in HTTP_REQUEST and then sending the response from the iRule after X number of seconds if HTTP_RESPONSE hasn't been triggered of if the response is a bad code. In 9.x, I don't think you can do exactly that. I think the closest you'll get is checking the response code in HTTP_RESPONSE and handling a load balancing failure in LB_FAILED.

     

     

    Aaron