Forum Discussion
Nov 17, 2010
matchclass, uri routing, and cookie persist & snat irule
Hey guys and gals, it's been a bit, I hope all is well.
Please review the below scenerio and let me know if i'm missing something, or if you would do anything differently..
I worked up the b...
Brian_Mayer_841
Jan 27, 2012Nimbostratus
Hey guys - I have a similar question and am preparing to write an iRule that routes to particular pools based on the URI, however, in addition, we'll need to persist the session to an existing pool member if the cookie exists for the pool specified in the URI. If none of the URI paths matched we could just send them to a default pool, applying one of the session ID cookies if present too.
For example, here's how the logic would flow:
1. Request comes inbound for one of the following URI paths:
/plan*
/unica*
/campaign*
2. LTM parses the URI and determines which pool should receive the request (likely using a class match operation), by reading the preceding string of the URI patch.
3. After determine the path and appropriate pool, the LTM should then search for existing session cookies pertinent to that given pool. In our scenario, each pool will have its own specific session cookies:
/plan (cookie: PLANSESSIONID)
/unica (cookie: PLATFORMJSESSIONID)
/campaign (cookie: CAMPAIGNJSESSIONID)
Essentially, once the F5 knows which pool should receive the request, it can then search the HTTP header for the matching cookie for that pool to see if there's an existing session, or whether a new session should be initiated.
4. If none of the URIs match in the class list, then I'd like to have a default catch-all which will auto-route the request to the /unica URI pool, and then persist off of the corresponding PLATFORMSESSIONID cookie.
I'm working on a draft of this now, though it certainly seems to me that the iRule shown further above in this post would work as a good starting point. I'd just need to break out into a few more if/then clauses.
What do you guys think?
Thanks!
B
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