Forum Discussion
Jogen_Doshi_453
Nimbostratus
Dec 03, 2008BIG-LTM Loadbalancing problem
Hi,
We have a setup where in the user request hit a web server whcih in turn is calling the virtual ip on my BIG-IP.
Now the web server is SSO across many applications o...
Jogen_Doshi_453
Nimbostratus
Dec 03, 2008Also i have hunted the following irul as it seemed to be of help.
can u suggest.
when HTTP_RESPONSE {
Clear the BSI_SESSIONID if it exists already on this TCP connection
if {[info exists BSI_SESSIONID]}{
unset BSI_SESSIONID
}
Only look for the BSI_SESSIONID in text responses
if {[HTTP::header value "Content-Type"] starts_with "text"}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched text, enabling stream filter"
Because TCL doesn't support lookaheads, match the BSI_SESSIONID string and value
We'll parse out the value in STREAM_MATCHED
Assume the BSI_SESSIONID is 1 to 100 characters (terminated by a non-alphanumeric character).
STREAM::expression {@;BSI_SESSIONID=[A-Za-z0-9]{1,100}@}
STREAM::enable
Enable the STREAM_MATCHED event as it could have been disabled if there was a prior
response on this TCP connection
event STREAM_MATCHED enable
} else {
Disable the stream filter as this wasn't a text response
log local0. "[IP::client_addr]:[TCP::client_port]: No Content-Type match, disabling stream filter"
STREAM::disable
}
}
when STREAM_MATCHED {
Save the matched value (example: ;BSI_SESSIONID=ABCDEF)
set BSI_SESSIONID [STREAM::match]
log local0. "[IP::client_addr]:[TCP::client_port]: Matched: $BSI_SESSIONID"
STREAM::match shouldn't match a null string with the defined regex, but check anyhow
if {[string length $BSI_SESSIONID]}{
Get the BSI_SESSIONID value (split ;BSI_SESSIONID=ABCDEF on the equals sign)
set BSI_SESSIONID [getfield $BSI_SESSIONID "=" 2]
The iRule parser doesn't allow the persist command in STREAM_MATCHED.
It works though, so hide the command from the parser
set persist_cmd "persist add uie $BSI_SESSIONID"
log local0. "[IP::client_addr]:[TCP::client_port]: Parsed: $BSI_SESSIONID \$persist_cmd: $persist_cmd"
eval $persist_cmd
persist add uie $BSI_SESSIONID
Assume the first match is the same as any other BSI_SESSIONIDs, so stop checking for them
log local0. "[IP::client_addr]:[TCP::client_port]: Added persistence record. Exiting event for this response."
event STREAM_MATCHED disable
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects