Forum Discussion
iRule: Adjust idle timeout for 1 particular call
Hello,
I had a few questions if anyone has implemented or tried this I know there's a wiki link for it, link, However I wanted to know if the sample request would open the idle time out for ALL requests to the box during that window we set or if it will only set for that one request and all subsequent calls after will be set to the default of 300 seconds.
Also would it help if we added an elseif? if so would that then terminate the request that's already in process of the call?
sample code(s) is as such
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/portal" } {
IP::idle_timeout 7200
}
}
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/portal" } {
IP::idle_timeout 7200
}
else {
IP::idle_timeout 300
}
The use of "else" clause is good for visibility reasons. Admin does not have to check the settings inside a TCP profile to know what the TO value is for all other requests.
For efficiency, I recommend using a comparison against
, instead of your current[string tolower[HTTP::path]] starts_with
statement.[HTTP::uri] starts_with
- Hannes_RappNimbostratus
The use of "else" clause is good for visibility reasons. Admin does not have to check the settings inside a TCP profile to know what the TO value is for all other requests.
For efficiency, I recommend using a comparison against
, instead of your current[string tolower[HTTP::path]] starts_with
statement.[HTTP::uri] starts_with
- Hannes_RappNimbostratusAlso note that your iRule only has the expected effect, if by requesting page "/portal*" there are no requests made to other pages served via the same VIP (e.g JPG, CSS, PNG etc.. files in "/static_files"). Since HTTP1.1 a single TCP connection is used for multiple GET requests. Therefore, if any content on page is in another parent directory, the IDLE timeout value will be repeatedly overwritten and this affects performance negatively. What's more, the actual timeout value on /portal page can still be 300 seconds (assuming the last request was made to /static_files/mylogo.png).
- EricRs_201906NimbostratusYes Portal is just a place holder.. I believe an ASMX page is what will be called however I'm waiting for the developer on the ASMX to tell me what the actual call is :)
- Hannes_Rapp_162Nacreous
The use of "else" clause is good for visibility reasons. Admin does not have to check the settings inside a TCP profile to know what the TO value is for all other requests.
For efficiency, I recommend using a comparison against
, instead of your current[string tolower[HTTP::path]] starts_with
statement.[HTTP::uri] starts_with
- Hannes_Rapp_162NacreousAlso note that your iRule only has the expected effect, if by requesting page "/portal*" there are no requests made to other pages served via the same VIP (e.g JPG, CSS, PNG etc.. files in "/static_files"). Since HTTP1.1 a single TCP connection is used for multiple GET requests. Therefore, if any content on page is in another parent directory, the IDLE timeout value will be repeatedly overwritten and this affects performance negatively. What's more, the actual timeout value on /portal page can still be 300 seconds (assuming the last request was made to /static_files/mylogo.png).
- EricRs_201906NimbostratusYes Portal is just a place holder.. I believe an ASMX page is what will be called however I'm waiting for the developer on the ASMX to tell me what the actual call is :)
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