Forum Discussion
Tim_Pearson_917
Nimbostratus
Sep 05, 2006One HTTPS virtual to several HTTPS pools
I am trying to write an iRule to take traffic from an HTTPS virtual (SSL terminated on the F5) and distribute the traffic to the correct pool based on the URI information. Currently, there are only 2 apps that are used, more to be added soon. I have actually tried a couple of different ways of doing this but each one just sends the traffic to one pool, repeatedly.
when HTTP_REQUEST {
switch [HTTP::uri] {
"/passwordreset" {
log local0. "passwordreset"
[HTTP::uri] "/nps/imanager.html"
pool passwordResetSSL }
"/nps" {
log local0. "passwordreset"
pool passwordResetSSL }
"/webmail1" {
log local0. "webmail1"
HTTP::uri "/"
pool webMailSSL }
"/servlet/webacc" {
log local0. "webmail1"
pool webMailSSL }
}
}
or this way, of course the above URI information is in a data group for this one.
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] starts_with $::passwordreset_Strings] } {
pool passwordResetSSL }
elseif { [matchclass [HTTP::uri] starts_with $::webmail_strings]} {
pool webMailSSL }
else {pool ChildrensWWW}
}
Depending on which app I hit first is the one that I keep getting sent to, it is with either iRule. Any ideas?
Thanks,
Tim
- Deb_Allen_18Historic F5 AccountTry enabling a OneConnect profile on the virtual server.
- unRuleY_95363Historic F5 AccountDeb, I just wanted to clarify something you've said several times now.Without OneConnect enabled, only the first request in a Keep-Alive connection is parsed for persistence data, so if multiple requests are sent on the same clientside Keep-Alive connection, LTM will persist them all to the same destination as the first.This is not entirely accurate. In fact, the BIG-IP parses all requests as long as the HTTP profile is on the virtual (and not disabled). However, the serverside connection is maintained unless either OneConnect is enabled or a new pool is picked. So, in this case, I would have expected it to change pool assuming the uri changed to one of the other values. This is often confused with the issue that the default pool is not automatically re-selected when there is no "else" clause.
- Robert_47833
Altostratus
yeah,I have one vip which only has http profile ,but it can do content switching for multiple http requests in a single tcp connection without one connect profile enabled is this as expected?
- unRuleY_95363Historic F5 AccountYes, you got it!
- Tim_Pearson_917
Nimbostratus
Just to clarify, I did not test the whole second rule. The else was just a catch all at the end, I really don't see it ever being hit. I was just more focused on the other sites. Thanks again for all the help and advice
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