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

it looks okay to me.

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

it looks okay to me.

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

Thanks but i see snat2vip also in configuration will that idle timeout in SNAT affect this Irule ?

Thanks but i see snat2vip also in configuration will that idle timeout in SNAT affect this Irule ?

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.

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.