Forum Discussion
Arie
Nov 14, 2014Altostratus
I'm assuming that you want to use Webnode1 and Appnode1. If Webnode1 is down you want to use Webnode2 and Appnode2, except if Appnode2 is down. In that case you still want to use Appnode1.
To accomplish this (and to prevent hard-coding more node IP-addresses than necessary) I would create a fall-back pool that is the inverse of APP-Pool (i.e. switch the priority groups). In the iRule I used the name APP-Pool-Fallback for this pool.
Here's the rule you would then apply to the VIP for APP:
when HTTP_REQUEST {
if { [LB::status pool WEB-Pool member 10.1.2.101 80] eq "down" } {
pool APP-Pool-Fallback
}
}
Note: replace "10.1.2.101" with the IP-address of Webnode1.