Forum Discussion
iRules redirect to multiple pools
When you have a VIP with just a iRule that based on the url ,the traffic gets directed to different multiple pools outside of the VIP.
How does sessions work at that point since my VIP doesn't have any pools/nodes.Do i need do something in the iRule. Most of all our existing VIP have source addressing sessions
Traffic exemple Client connect to VIP VIP->iRule (URL=/test)->Pool (contains two nodes)->node 1
I don't want to same client go to go node 2 for the same session
If the same traffic goes.I want it to go the same node and not being load balance to a different node.
Omega
9 Replies
- Scott_Hopkins
Nimbostratus
Sessions are already handled at the pool level based on the persistence profile you select on the virtual server. For example, when using cookie persistence, this means a end user may have two cookies recording session preference if you have two different pools (one for each pool).
- omegaman66_1784
Nimbostratus
So if I select a persistence profile on a virtual server that forwards traffic outside of its VIP and on to a pool,the persistence profile from the virtual server would carry onto the pool?
Omega
- shaggy
Nimbostratus
yes - what type of persistence are you using? - Brad_Parker
Cirrus
Yes.
- Scott_Hopkins
Nimbostratus
Basically. A different way to think of it is that the iRule and the persistence logic are attached to the virtual server, and that's where the decision is being made, not in the pool. The 'pool' command basically requests the pool make a load balancing decision based on it's defined 'Load Balancing Method', and then uses the default/fallback persistence profiles on the virtual server to 'pin' the session.
This is why you can override (and overload) pool member selection in iRules to make your own persistent methods.
It's actually possible to have multiple Virtual Servers using different persistence methods on the same pool. The Default/failback is also a good example of how this is really being done in hte virtual server side, not the pool.
- omegaman66_1784
Nimbostratus
Source addressing.
So lets say by iRules from my VIP redirect to a pool from another VIP
Would it follow the original VIP session settings or the VIP thats part of the pool
Omega
- shaggy
Nimbostratus
with source-addressing, it should follow the original VIP to the pool-member. if you have cli access, look at some of the persistence records to get an idea tmos) show ltm persistence persist-records virtual (virtual-server-name)
- omegaman66_1784
Nimbostratus
With source and destination persistence ,it didn't show in the persistence records but with SSL it did
- shaggy
Nimbostratus
it should - source-address persistence is records-based. try: show ltm persistence persist-records mode source-address
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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