Forum Discussion
Maria_Ramirez_5
Nimbostratus
Feb 09, 2007weblogic persistenca does not works
Good morning,
I have a problem with iRules.
I have a pool with two weblogic servers. I want to maintain persistence based on cookies.
I create a virtual server for the pool of the...
Wes_98712
Nimbostratus
Feb 09, 2007If you want to persist based on a specific cookie that has been programmed into the application, I would suggest you get the name and the length and simply use a cookie hash profile, this is the most efficient that I have found rather than trying to control it via an iRule.
If you are dealing with a weblogic cluster, or any other J2EE/JEE cluster you have to be careful with persistence, if the application is stateless than you shouldn't need persistence, if it is a stateful application, then persistence is pretty much implied, as such you need to start looking at either the embedded application cookie which probably contains the users session information, or in the case of Weblogic and most other J2EE/JEE containers/servlet engines, look at the JSESSIONID, and hash that.
I went through this a few times and found that simply using the cookie has profile with LTM is far more efficient than trying to set a bunch of irule logic to handle the cookie.
The other thing you are doing is trying to create your cookie on the fly, to correspond to the IP address and seemingly the root of URI path, if I am reading that right. The real question it seems is what are you trying to accomplish and if it is simply persisting to the same server with a cookie, then either hash the jsessionID or the internal cookie from the application, or use active cookie insert and set it to the timeout of the application.
iRules are very powerful, but they can be your worst enemy if you don't do them right, in this case it looks like you are trying to accomplish something that a persistence profile will handle a whole lot easier, and it's less administrative overhead.
-Wes
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
