Forum Discussion
Laurent_P_
Employee
Feb 08, 2006iRule for RTSP
Hi all,
I'm working on iRule which should do the following .
I have two Virtual Servers :
* One for RTSP traffic on which I setup persistence per source_addr.
* One for HTTP traffic which should connect the user to the same node that handling the RTSP connection.
In order to do so, I wrote the following iRule, expecting that I can query the persistence table and get the IP address of the node processing the RTSP connection. To get the IP of the client, it's only reading an HTTP header containing this value.
Am I right on my expectations ?
when HTTP_REQUEST {
client
set realip [HTTP::header "x-nokia-ip-address"]
set realnode [persist lookup uie $realip]
node $realnode
persist uie $realip
log "Node $realnode for client $realip"
}
Shall either lookup the session table ?
Thanks a lot for your answer.
Regards.
- Laurent_P_
Employee
Guys, - Colin_Walker_12Historic F5 AccountIn regards to using the information in the persistence table...you'll need to use the persist lookup command, like your rule alludes to. It looks like you need a little further clarification on the options of this command.
persist simple [] [] persist source_addr [] [] persist sticky [] [] persist dest_addr [] [] persist ssl [] persist msrdp [] persist cookie [insert [] [] | rewrite [] [] | passive [] | hash [{ [] } []] ] persist uie [] persist hash []
persist add [] persist lookup [all|node|port|pool] "all" or no specification returns a list containing the node, port and pool name. Specifying any of the other return types will return the specified item only. persist delete = simple | source_addr | sticky | dest_addr | ssl | uie | hash = | { [any virtual|service|pool] [pool ] } the latter key specification is used to create/access persist entries across virtuals, services, or pools.
- Colin_Walker_12Historic F5 AccountOh, I also wanted to note that I'm not 100% sure you need an iRule here. I think if you enable universal persistence on the source address on these two virtuals, and enable the "across virtuals" option on both of them, then you might achieve what you're looking for without an iRule at all.
- Laurent_P_
Employee
Currently, - Laurent_P_
Employee
Both VIPs have persistence profile attached : - Colin_Walker_12Historic F5 AccountHave you tried using the persist lookup command, instead of session lookup?
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