Forum Discussion

Agathe_309970's avatar
Agathe_309970
Icon for Altocumulus rankAltocumulus
Aug 03, 2017

Change the timeout according a pool member

Hi,

 

I want to change the timeout for one pool. But it depends of a TCP profile (which is apply to a virtual server). Is there a solution for change this timeout without affect the other pool member of the VS ? I think it's maybe possible with iRules but I'm not sure.

 

Thank a lot for your help.

 

Agathe

 

  • Hi,

    You can try to test with the iRule below.

    when SERVER_CONNECTED {
       if { [IP::addr [LB::server addr] equals 10.10.10.10] } {
           set TCP::idletime 10
      } else {
            set TCP::idletime 300
      }
    }
    

    Where 10.10.10.10 is the IP-address of the pool member.

    Good luck.

    Martijn.

  • Hello, Why not create two diferent TCP profiles ? Could you please give further details ?

     

  • I have a virtual server with several pool member (one pool member for one entry reverse proxy). For one of these pool member, I need to change the timeout. I can't create two virtual server to solve the problem.

     

    I can create two different TCP profiles but I can only affect one TCP profile to the virtual server.

     

  • Hi,

    You can try to test with the iRule below.

    when SERVER_CONNECTED {
       if { [IP::addr [LB::server addr] equals 10.10.10.10] } {
           set TCP::idletime 10
      } else {
            set TCP::idletime 300
      }
    }
    

    Where 10.10.10.10 is the IP-address of the pool member.

    Good luck.

    Martijn.

    • Agathe_309970's avatar
      Agathe_309970
      Icon for Altocumulus rankAltocumulus

      Hi,

      Thank for your response. Yes I just found some response with the iRule. I tested this iRule which seems working.

      when HTTP_REQUEST {
          if { ([HTTP::host] == "abc.com") } {
              IP::idle_timeout 1800
              set serverside_idle_timeout 1
          }
      }
      when SERVER_CONNECTED {
          if {$serverside_idle_timeout} {
              IP::idle_timeout 1800
          }
      }
      

      Thanks a lot for your help.

      Agathe

  • Hi,

    You can try to test with the iRule below.

    when SERVER_CONNECTED {
       if { [IP::addr [LB::server addr] equals 10.10.10.10] } {
           set TCP::idletime 10
      } else {
            set TCP::idletime 300
      }
    }
    

    Where 10.10.10.10 is the IP-address of the pool member.

    Good luck.

    Martijn.

    • Agathe_309970's avatar
      Agathe_309970
      Icon for Altocumulus rankAltocumulus

      Hi,

      Thank for your response. Yes I just found some response with the iRule. I tested this iRule which seems working.

      when HTTP_REQUEST {
          if { ([HTTP::host] == "abc.com") } {
              IP::idle_timeout 1800
              set serverside_idle_timeout 1
          }
      }
      when SERVER_CONNECTED {
          if {$serverside_idle_timeout} {
              IP::idle_timeout 1800
          }
      }
      

      Thanks a lot for your help.

      Agathe