Forum Discussion

Evgeny_Kogan_51's avatar
Evgeny_Kogan_51
Icon for Nimbostratus rankNimbostratus
Dec 31, 2006

Reselect pool's member on LB_FAILED event

Hi ALL!

 

 

I have a pool defined with 3 members: node1(1.1.1.1) node2(1.1.1.2) and node2(1.1.1.3)

 

I need to move an active traffic from a dead member to an active one when LB reports about failure of one of the members.

 

A new traffic will be balanced between the active members in the pool.

 

 

I did not find the command which returns the list of "dead" member so, here is the code please assist me with the syntax and check if it sounds reasonable:

 

------------------------------------------------------

 

when LB_SELECTED {

 

if { [LB::status session_disabled] } {

 

LB::reselect pool my_pool

 

}

 

}

 

 

when LB_FAILED {

 

if {(active_nodes my_pool contains "node1") and (active_nodes my_pool contains "node2") }

 

{ LB::reselect pool my_pool member 1.1.1.3 } elseif

 

{(active_nodes my_pool contains "node1") and (active_nodes my_pool contains "node3") }

 

{ LB::reselect pool my_pool member 1.1.1.2 } elseif

 

{(active_nodes my_pool contains "node2") and (active_nodes my_pool contains "node3") }

 

{ LB::reselect pool my_pool member 1.1.1.1 }

 

}
No RepliesBe the first to reply