Forum Discussion
chris_connell_1
Nimbostratus
Jun 17, 2010persistency on this irule
I have this irule which does not seem to work correctly in that I see requests not sent to the specified node when it hits the top 2 rules. Do we have to specify persistency in the irule even when its...
hoolio
Cirrostratus
Jun 17, 2010Hi Chris,
Unfortunately, I think this is expected. See these two related posts for more info:
http://devcentral.f5.com/Forums/tabid/1082223/asg/50/showtab/groupforums/aff/5/aft/1167826/afv/topic/Default.aspx1167901
http://devcentral.f5.com/Forums/tabid/1082223/asg/50/showtab/groupforums/aff/5/aft/1166691/afv/topic/Default.aspx
If you want to keep a client going to one node regardless of the rest of the conditions, I think you'd need to track this yourself. You could do this with cookies if it's HTTP traffic or using the client IP in the session table. Here's an untested example of the latter:
when CLIENT_ACCEPTED {
Check if client IP is in session table
set node_info [session lookup uie [IP::client_addr]]
if {$node_info ne ""}{
Use the IP and port from the session table entry
scan $node_info {%s %s} ip port
node $ip $port
} else {
if { [matchclass [IP::remote_addr] equals ::opt-client] and [active_members unison] > 1 } {
Select the node and record the selection in the session table for 1 hour
node 10.129.60.2 80
session add uie [IP::client_addr] [list 10.129.60.2 80] 3600
} elseif { [matchclass [IP::remote_addr] equals ::noopt-client] and [active_members unison] > 1 } {
Select the node and record the selection in the session table for 1 hour
node 10.129.60.66 80
session add uie [IP::client_addr] [list 10.129.60.66 80] 3600
} elseif { [active_members unison] < 1 } {
virtual forwarding_TCP_vs
}
}
}
Aaron
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