Keith_04
Jan 14, 2017Nimbostratus
Wide ip selection based on pool members
I have three non-LTM VIP's, which I have added to the GTM as generic hosts. If any of these VIP's fails, I need to move all three VIP's over to the other data center.
My plan: Create a pool called VIPs and place the three non-LTM VIP's into it. Create an iRule that checks if active members is equal to members (i.e. everything is up), if so respond back with data center 1 IP, if not respond back with data center 2.
I have built this out, VIP's in data center 1 are up but when I query the wide-ip I receive a non-existence domain error. Other wide-ip's work as expected.
My iRule (a snippet):
when DNS_REQUEST {
switch [DNS::question name] {
work.somedomain.com {
if { [active_members vips ] < [members vips ] } {
pool datacenter2IP
} else {
pool datacenter1IP
}
}
}
}
Will this work or am I off in my thinking?