Irule: use an other pool members (or nodes) when the default VS pool become down

Hello,

I beggining on Irule and I search to write one wich use an alternative pool members (or nodes) when the default VS pool member was failed. Thank you for help.

Ckteur.

Something like this should work:

when CLIENT_ACCEPTED {
     Check if the VS default pool has no active members
    if {[active_members [LB::server pool]] < 1 }{
        pool sorry_pool
    }
}

I believe this could also be accomplished without an iRule in the virtual server.

Open your virtual server and go to Resources On the Resources tab you should be able to select a fallback pool. This pool could contain a single node or multiple nodes.

I believe this would also accomplish what you are looking to do without needing to code anything.

Ok thank you Cory, it’s a bit what I thought … I Will try it but brad’s remark is also relevant.

Thank you Brad ! Sure, I’ll watch but I didn’t have the F5 again with me, so i look this when I can.

Hello Brad, I’m sorry but I Looked on “ressources” field in VS menu, but there are not “failback” pool anywhere … just “profil failback”. It’s BIG-IP 4000S LTM V11.5. An opinion ? Thanks.

Hello Brad, I’m sorry but I Looked on “ressources” field in VS menu, but there are not “failback” pool anywhere … just “profil failback”. It’s BIG-IP 4000S LTM V11.5. An opinion ? Thanks.

If I’m not mistaken, fallback pool is a GTM configuration item and not in LTM. The iRule is probably your best way to go. The above iRule is generic enough to work for all traffic types. You have more options than just this though if the traffic is HTTP.

Ok thank you. I will try the irule. A part of traffic is effectively HTTP.