Redirect traffic depending nodes active/passive
Good afternoon.
I Have this problem:
Exist two nodes (active-passive), in this nodes was installed an agent it work for port 5555 that is always up. I need to direct traffic to the node that is active, the active server will port 7777 will have up. I have configured the virtual server and pool, but can not find the irule to let me choose the node is active, the best performances I have obtained the following irule
when LB_SELECTED {
if { [IP::addr [LB::server addr] equals 10.193.30.56] and [LB::status pool Pool_ORIB_APP_PRD_7777 member 10.193.30.56 7777 up]} {
persist source_addr }
else {
LB::reselect node 10.193.30.52 5555
}
The configuration complete is:
virtual VS_DATA_PROTECTOR_ORRIB_PRD {
snat automap
pool Pool_DATA_PROTECTOR_ORIB_APP_PRD
destination 10.193.30.61:5555
ip protocol tcp
rules LB_STATUS_DATA_PROTECTOR
vlans internal enable
}
pool Pool_DATA_PROTECTOR_ORIB_APP_PRD {
monitor all tcp
members {
10.193.30.52:5555
10.193.30.56:5555
pool Pool_ORIB_APP_PRD_7777 {
monitor all http
members {
10.193.30.52:7777
10.193.30.56:7777
rule LB_STATUS_DATA_PROTECTOR {
when LB_SELECTED {
if { [IP::addr [LB::server addr] equals 10.193.30.56] and [LB::status pool Pool_ORIB_APP_PRD_7777 member 10.193.30.56 7777 up] } {
persist source_addr }
else {
LB::reselect node 10.193.30.52 5555
}
}
This configuration works the second or third attempt, the first one fails. I got an event before it is chosen a node, in which case you can go to the server traffic in passive state
I appreciate the help you can give me.