Forum Discussion

Oliver_Schmidt's avatar
Oliver_Schmidt
Icon for Nimbostratus rankNimbostratus
Feb 16, 2006

http keep alive timeout

I want to define a http keep alive timeout for the client - bigip connection. In an http profile you can only configure the max. no. of connections. The keep alive timeout in an oneconnect profile defines the timeout for the bigip - webserver connections. Without such a timeout the bigip waits for the tcp timeout to reset the connection.

 

Any ideas?

 

Oliver

5 Replies

  • A HTTP keep-alive timeout resets the connection, too. So you could just use tcp timeout.

     

    For http conformance you should add an appropriate Keep-Alive header:

     

     

    when HTTP_RESPONSE {

     

    HTTP::header replace "Connection" "keep-alive"

     

    HTTP::header replace "Keep-Alive" "timeout=[yourtimeouthere], max=99"

     

    }
  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    The idle timeout on the box applies to both the server and client side connections. So that should be all that you need to configure. If you need to override it per connection basis, you can use the rule ...
    IP::idle_timeout
  • I want to define different timeouts for tcp and http keep alive.

     

    Just like in an apache webserver, i. e.:

     

    Timeout: The number of seconds before receives and sends time out.

     

    Timeout 60

     

    KeepAliveTimeout: Number of seconds to wait for the next request from the

     

    KeepAliveTimeout 5

     

     

    How can I do that?
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    mmoeller shows how to add / modify this header earlier in this thread...

     

     

    -Colin
  • The following irule seems to work:

     

    when HTTP_REQUEST {IP::idle_timeout 60}

     

    when HTTP_RESPONSE {IP::idle_timeout 5}

     

    in opposite to an apache keep alive timeout the connection now ends with a RST not with a FIN, but that is cosmetic.

     

    I know the BIG-IP has no problems in handling many connections. But we have several other components between BIG-IP and the client, i. e. some firewalls. We receive 2000 connections per second. A timeout of 60 implies a minimum of 120000 connections. That's to much.