Forum Discussion
Session ID persistence based on SessionID parameter in Xml tag
Iam trying to write I-rule based on following requirement
- Client requests to initiate a session F5 forwards the call to available Node in the pool.
- Node sends response to F5 containing sessionid F5 extracts sessionid from xml tag and creates a new persistence.
- F5 then forwards the HTTP response to client Client stores the sessionid .
- Client uses the sessionid to create a new request using sessionid in the URL F5 will parse the URL to retrieve the sessionid and use the existing persistence data to redirect the request to the right Node.
- The F5 script should be clever enough to retrieve sessionid in a case-insensitive way and persist. F5 can distinguish first call from the subsequent calls by parsing the URL as the first call will not contain any sessionid text.
Can some one please help iam completely new to F5 .
Thanks Amit
- AnirbanNimbostratus
Me too searching for same. For my case it's HTTP payload.
when HTTP_RESPONSE {
if {[string length [findstr [HTTP::header] "<return>" 8 "</return>"]] == 30} ---> Create your own logic to identufy string
{
set SESSIONID_RS [findstr [HTTP::header] "<return>" 8 "</return>"]
log local0. "Response SessionID: $SESSIONID_RS"
persist uie add $SESSIONID_RS 1800
else {
persist source_address}
}
}
when HTTP_REQUEST {
if {[string length [findstr [HTTP::header] "<arg0>" 6 "</arg0>"]] == 30}
{
set SESSIONID_RQ [findstr [HTTP::header] "<arg0>" 6 "</arg0>"]
log local0. "Request SessionID: $SESSIONID_RQ"
persist uie $SESSIONID_RQ 1800
}
}
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