pjedrzejak
Apr 19, 2018Nimbostratus
iRule for pool selecting
Hi,
I'm looking for advice from F5 Experts 🙂
I got two pools:
DC_W_pool - nodes in same DC
DC_P_pool - nodes in second DC
I try to achive situation where connection to VIP on DC_W will forward to DC_W_pool only if this pool is UP. If DC_W_pool is DOWN I want to redirect connections to DC_P_pool. I think it's necessary to SNAT this connection.
After some research i wrote iRule like this:
when CLIENT_ACCEPTED {
if { LB::down pool }{
snat automap
pool
}
else{
pool
}
}
when LB_FAILED{
if { LB::down pool }{
snat automap
pool
}
else{
pool
}
}
Is it correct?
I know that best solution for that will be a GTM/DNS but there is no chance to buy new equipment/licences at this moment.
Thanks for help!