Forum Discussion
Klaus_Gerthein1
Aug 31, 2012Nimbostratus
Getting uie persistence info from persistence table
Hello,
I am load balancing a mysql master master cluster via persist uie to ge a single node persistence.
I used this documentation: https://devcentral.f5.com/wiki/irules.singl...
nitass
Sep 02, 2012Employee
can you try "1 any virtual"?
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
}
[root@ve10:Active] config b pool foo list
pool foo {
members {
200.200.200.101:80 {}
200.200.200.102:80 {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
persist uie 1
}
}
[root@ve10:Active] config b rule mybackup list
rule mybackup {
when CLIENT_ACCEPTED {
set p [persist lookup uie {1 any virtual}]
if {[scan $p "[LB::server pool] %s %d" ip port] == 2} {
foreach m [active_members -list [LB::server pool]] {
if {$m ne "$ip $port"} {
pool [LB::server pool] member $m
break
}
}
} else {
reject
}
}
when SERVER_CONNECTED {
log local0. "[IP::remote_addr]:[TCP::remote_port]"
}
}
[root@ve10:Active] config b persist
PERSISTENT CONNECTIONS
Type Virtual Node
universal 172.28.19.79:80 200.200.200.101:80
[root@ve10:Active] config cat /var/log/ltm
Sep 3 06:14:30 local/tmm info tmm[4925]: Rule mybackup : 200.200.200.102:80
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