Forum Discussion
raul_rodriguez_
Nimbostratus
Apr 07, 2005Multi-tier application - Maintaining persistence/state
Application Logic:
Client--HTTP-->VIP(tier1)-->Tomcat webserver--TCP:8009-->VIP(tier2)----------->JDK1.4.2_06:Tomcat server
I need to be able to loadbalance both tiers, with persistence based on the Client IP. In other words I need "state" maintained between the Client, webserver and the JKD:Tomcat server. But if a new client connects to the same webserver (tier1) it should be able to send this new clients requests to the 2nd JDK:Tomcat server...etc.
Can I do this with an iRule? and how?
Thanks.
5 Replies
- drteeth_127330Historic F5 AccountSo tomcat is connecting to the tier2 vip? Is tomcat simply forwarding the request? Does it preserve the request headers and cookies? Is it transparent, i.e. does it preserve the client IP address? You should be able to do this with iRules provided that there is some information to persist on.
- unRuleY_95363Historic F5 AccountAre both the tier 1 and tier 2 VIP's hosted on the same BIGIP?
To reiterate, it sounds like you want the persistence to be applied jointly to both tiers. So, in example, when a new client comes in, they are load balanced to a webserver, and then in turn load balanced to a Tomcat server. However, when the same client returns, they are persisted to both the same webserver and Tomcat server? Is this correct?
This sounds like it would work just fine by using universal persistence on the JSESSIONID cookie at both tiers. An example of that can be found in this posting: Click here
http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=2111 - raul_rodriguez_
Nimbostratus
Yes, both Tier Vip's are on the same BIGIP.
Yes, you are correct- I need persistence through both tiers.
I will investigate...Thanks for your help. - Brian_Gupta_115
Nimbostratus
Am a bit confused about persistence in a URI parsing iRule. What is the order of precedence?
I have a rule that sends requests that begin with /service1 to pool service1, and sends requests that begin with /service2 to pool service2. (The client will be navigating between the two URIs).
Will seperate persistence entries for each pool be maintained? Or can there be only one per VIP/client? (I am using simple source persistence for the VIP).
Thanks,
Brandorr - drteeth_127330Historic F5 AccountBy default, separate persistence entries are maintained for each pool. That is, the pool is an implicit key for a persistence record unless the "across_pools" attribute is enabled on the persistence profile.
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