Forum Discussion

astokes_6920's avatar
astokes_6920
Icon for Nimbostratus rankNimbostratus
Nov 10, 2009

HTTP monitor with HEAD, not GET

While using the following monitor, I'm finding that the web servers are keeping TCP sessions in the TIME_WAIT state, rather than closing them outright.

 

 

GET /serverin.html HTTP/1.1\r\nConnection: Close\r\nHost: \r\n\r\n

 

 

My understanding was that by specifying HTTP 1.1, with the Close and carriage return, I'd be forcing the FIN and FINACK thereby closing the connection. Unfortunately, at any given time, I've got 3000 plus TIME_WAIT states on my web server courtesy of the F5. Obviously I'm missing something here.

 

 

Is it possible to use HEAD instead of GET within the send string to correct this? Or is there something else I need to add to the existing string to force an outright closing of the connection?

 

 

I've checked the archives here and am not finding a whole lot on the use of HEAD within a monitor.

 

 

Any assistance is greatly appreciated.

15 Replies

  • Hi Darren,

     

     

    Which LTM version are you running?

     

     

    What's your monitor config look like?

     

     

    What server OS/version is being monitored?

     

     

    How long to the connections stay in TIME_WAIT?

     

     

    If you run a tcpdump between an LTM static self IP and one pool member, how are the connections being handled after a response is received by LTM?

     

     

    Aaron
  • Hi Aaron,

     

     

    Version 10.1.0

     

     

    GET /ApplicationFacade.svc HTTP/1.1\r\nHost:\r\nConnection: Close\r\n\r\n

     

     

    The connections stay in time_wait for 2 minutes on the servers.

     

     

    I've done a tcpdump is there anything in particular I should be looking for after a response is received by the LTM?

     

     

    Many Thanks

     

    Darren
  • If we do not want to have tons of TCP connections in TIME_WAIT state, can we set TIME/WAIT Recycle to disable and/or TIME/WAIT Immediate (system closes the connection immediately after the connection enters the TIME/WAIT state).

     

  • Yes, although I'm not certain which side of the connection flow you're referring to. I'll assume you're talking about the server side.

     

     

    In that case, you'll want to keep both time_wait recycle and re_use enabled, as it'll leave those sockets open as candidates for new connections if the stack deems it necessary. TIME_WAIT is something that the stack really should do, although the duration of that interval (by default 2*MSL) is somewhat a matter of debate, especially behind an LTM with a super smart TCP stack...

     

     

    By the way, not all OS's (linux, for one) allow you to tickle the TIME_WAIT interval - you'll see some bad information out there on the web, so tread lightly (e.g. setting the FIN_WAIT2 timer). So it's best to leave recycle/reuse enabled and let the stack sort it out as it needs to.

     

     

    HTH,

     

    --Matt Cauthorn