Forum Discussion
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
- nitass_89166
Noctilucent
it looks okay to me.
by the way, i think it may be better to use "equals" instead of "==" for string comparison.
- SynACk_128568
Cirrostratus
Thanks but i see snat2vip also in configuration will that idle timeout in SNAT affect this Irule ? - nitass_89166
Noctilucent
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.
- nitass
Employee
it looks okay to me.
by the way, i think it may be better to use "equals" instead of "==" for string comparison.
- SynACk_128568
Cirrostratus
Thanks but i see snat2vip also in configuration will that idle timeout in SNAT affect this Irule ? - nitass
Employee
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com