I would only think that i need to use global arrays because i use this data globally - there's at least two of those irules one attached to vhost1, the second irule to the second to vhost2.
For ease of use, the only things that are modified are:
set port "xxx"
set pool "pool_$port"
set portsec "yyy"
set poolsec "pool_$portsec"
vhost1
pool_xxx
node 1.1.1.1 xxx
node 1.1.1.2 xxx
vhost2
pool_yyy
node 1.1.1.1 yyy
node 1.1.1.2 yyy
if node 1.1.1.1 xxx is standby, then node 1.1.1.1 yyy should be standby. If node 1.1.1.2 xxx () goes down, 1.1.1.1 is set to active and so the connections to both of the virtual servers must be dropped and new connections initiated so that the programs are connected to and will log in to 1.1.1.1 yyy and 1.1.1.1 xxx.
What i'm trying to implement is a basic functionality of a fail-over cluster. The bad thing is that even if the action on svcdown is set to drop the connections are not dropped if I do LB::down.
I think LB::detach is not an option because the programs are connected to the server and waiting some data. Unless there's no data sent i can't even use when SERVER_DATA to do TCP::close or something like that.