Forum Discussion
My stick session
pool_node1 member 10.1.1.10:80 monitor tcp
pool_node2 member 20.1.1.20:80 monitor tcp
pool_default member 10.1.1.10:80 20.1.1.20:80 monitor tcp
iRuels code:
when RULE_INIT {
array set static::pool_array {
1 pool_node1
2 pool_node2
}
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "JSESSIONID"] } {
set node_x [findstr [HTTP::cookie "JSESSIONID"] "node" 4 1]
log local0. "node_x is $node_x"
if { [active_members [lindex [array get static::pool_array $node_x] 1]] == 0 } {
pool pool_default
} else {
pool [lindex [array get static::pool_array $node_x] 1]
}
} else {
pool pool_default
}
}
Think I like this. but modified
I will create singleton pools for each member and 1 pool with all members.
then
if I have no JSESSIONID or no NODE
then go to the generic pool
other wise
test to see if pool with 1 node corresponding to the NODE1 is available
if yes then send it
if no then send to generic pool
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
