Forum Discussion
redirect to pool based from uri
i know this topic has been done to death and I have configured irules of this fashion before, but this one has me pinned.
scenario
There is a landing page that hosts two links. one link to time stamp application and one link to HR application. This landing page resides on two servers. the same two servers that also host the applications.
task
fqdn has to stay the same for both urls.
when clicking on timestamp link i need that request to go to TS_pool and persist.
when clicking on HR link i need that request to go to HR_pool and persist.
This sounds simple, but i think having the landing page on both servers and cookie persistense combo'd with tabbed browsing is kicking me arse.
BIPIP ver 10.2.4
I have create a pool for each application and used cookie persitence. I have tried source addrrss as the persistence method, same result the page freezes. when i check cookies onteh browser session i see two one for each pool.
i hope i've provided enough information, any ideas are greatly welcomed.
TIA!
Steve
3 Replies
- Michael_Yates
Nimbostratus
Hi Steve,
I'm not really sure what you mean by this comment "fqdn has to stay the same for both urls", could you provide some additional explanation? Also, what do you mean by "same result the page freezes"?
It still sounds like source_addr persistence profile (Match Across Services, Match Across Virtual Servers, or Match Across Pools) is what you are looking for if you want to persist to the same server.
The double cookie behavior that you are seeing (two cookies) sounds correct. A Load Balancing decision to a specific node is a combination of the IP Address of the server and the Port Number of the application, so it would need a cookie for each to keep track of which server it sent you two for each pool. - steve_88008
Nimbostratus
thanks for the response Michael.
I'm not really sure what you mean by this comment "fqdn has to stay the same for both urls", could you provide some additional explanation?
the host name needs to remain constant. it can't be changed to something like the server name.
Also, what do you mean by "same result the page freezes"?
thats me thinking i mentioned the result in a earlier part of the post. Good chance I didn't, lol.
if i use src addr as a persistence method and check the match fields that you suggest. won't the connection persist to the default pool? this is where the connection initially starts from until the a uri is matched. - Michael_Yates
Nimbostratus
Hi Steve,
"the host name needs to remain constant. it can't be changed to something like the server name."
There are several ways that you could tackle this, but if the Hyperlinks on the page would otherwise redirect them to a different host I would suggest using a Stream Profile to change the Host Value in the Hyperlink (cleanest way that comes to mind. If you try URI Masking that can get messy and tricky).
You can apply them in two different ways:
1. Create a custom stream profile and apply it to your Virtual Server.
2. Create a "blank" stream profile and apply it to your Virtual Server and then use an iRule to perform the actual replacements.
The first option is cleaner (if you want more details on the first option just let us know), but you can learn more about the second here:
LTM stream profile: Multiple replacements & regular expression
STREAM::expression
"if i use src addr as a persistence method and check the match fields that you suggest. won't the connection persist to the default pool?"
If you modify the Host Value of each URL, yes the connections would all go to the default pool applied to the Virtual Server unless you use an iRule to split the traffic to go to different pools (based on the URI or some other value). Once they are directed to go to different pools, then the source_addr persistence would send the traffic to the same server (if that server is a member of that pool).
There is a good write-up on how source_addr persistence works here: Enabling Session Persistence
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