Forum Discussion
Misty_Spillers
Nimbostratus
Jan 06, 2010Question about managing different types of persistence on one virtual server.
So sorry if the answer is been posted before, every time I search I don't get the results I'm looking for.
I have a situation where we would like to have one virtual server and different type of persistence per pool.
Example: We have a virtual server (mainsite1) with persistence set to cookie: cookie method: HTTP Cookie Insert. Which is required for the majority of pools. Our developers have implemented a product called Scaleout Software on a couple of pools which requires Persistence set to NONE.
Right now I'm getting this to work with 2 virtual servers (mainsite1 and mainsite2), which is complicated for the users to remember and it is requiring many redirects. Any way to get the pools with different persistence to work with one virtual server?
Thank you so much for any help.
3 Replies
- The_Bhattman
Nimbostratus
Hi Misty,
It's possible to setup persistance for different pools via the irule
Here is an untested examplewhen HTTP_REQUEST { switch -glob [HTTP::host] { "www.site1.com" { persist cookie insert "site1_poolA_Cookie" "0d 00:30:00" pool poolA } "www.site2.com" { persist cookie insert "site2_poolB_Cookie" "0d 00:45:00" pool poolB } } }
I hope this helps
Bhattman - hoolio
Cirrostratus
Hi Misty,
Sure, you can use the persist command (Click here) to specify a different persistence method (not profile) and settings for a single VIP based on which pool you select. Here are a few related posts:
One VS, 2 pools, separate persistence
http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&postid=60318&ptarget=60319
Persistence Woes
http://devcentral.f5.com/Default.aspx?tabid=53&forumid=31&tpage=1&view=topic&postid=1753117547
If you read through these posts or try an iRule and have questions reply here for more feedback.
Aaron - hoolio
Cirrostratus
The wiki page for the persist command states that 'persist none' disables persistence for the rest of the TCP connection. So if you use the rule as it is, if a client makes a request for /app2, I think any subsequent request on the same connection would not get a persistence cookie. You could test this by adding logging to the iRule and using netcat (assuming it's an HTTP VIP) to open a TCP connection and then send a request for /app2 and then one for /app1. See if you get a persistence cookie in the response to /app1.
Here is an example from the LTM command line using netcat (nc):
$ nc 1.1.1.1 80
GET /app2 HTTP/1.0
Connection: keep-alive
GET /app1 HTTP/1.0
If it's working, in the response to the /app1 request you'll see a Set-Cookie header with the LTM persistence cookie.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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