Forum Discussion

SynACk_128568's avatar
SynACk_128568
Icon for Cirrostratus rankCirrostratus
Dec 26, 2014

Irule to increase idle timeout for particular URL and URI

Hi All ,

 

User have a requirement that if two host header are matched for ex. abc.com and cdf.com with URI /poodle . Then Idle timeout should be set to 86400 seconds . Bu default it is 300 sec in tcp-lan-optimized profile .

 

I created a irule with help of irule/events in devcentral , please let me know if this will work logically :

 

when HTTP_REQUEST {

 

if { (([HTTP::host] == "abc.com") or ([HTTP::host] == "cdf.com")) and ([HTTP::uri] ==

 

"/poodle") } {

 

IP::idle_timeout 86400

 

set serverside_idle_timeout 1

 

} }

 

when SERVER_CONNECTED {

 

if {$serverside_idle_timeout} {

 

IP::idle_timeout 86400

 

}

 

}

 

Thanks

 

6 Replies

  • it looks okay to me.

     

    by the way, i think it may be better to use "equals" instead of "==" for string comparison.

     

    • SynACk_128568's avatar
      SynACk_128568
      Icon for Cirrostratus rankCirrostratus
      Thanks but i see snat2vip also in configuration will that idle timeout in SNAT affect this Irule ?
    • nitass_89166's avatar
      nitass_89166
      Icon for Noctilucent rankNoctilucent
      i understand this timeout is applied to traffic matching virtual server. one more thing i forgot. serverside_idle_timeout variable should also be initiated. otherwise, traffic that does not match if-condition in HTTP_REQUEST will cause no such variable tcl error in SERVER_CONNECTED.
  • it looks okay to me.

     

    by the way, i think it may be better to use "equals" instead of "==" for string comparison.

     

    • SynACk_128568's avatar
      SynACk_128568
      Icon for Cirrostratus rankCirrostratus
      Thanks but i see snat2vip also in configuration will that idle timeout in SNAT affect this Irule ?
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee
      i understand this timeout is applied to traffic matching virtual server. one more thing i forgot. serverside_idle_timeout variable should also be initiated. otherwise, traffic that does not match if-condition in HTTP_REQUEST will cause no such variable tcl error in SERVER_CONNECTED.