Load Balancing between 2 Pool (Failover on 2 different pool)

Hi My requirement:- as per today my income traffic hits on VIP 1 which is mapped with X number of pool members , in case of unavailability of all pool member traffic should shift to another pool which has x number of pool member.

Can anyone provide me solution, if the solution is with irule then help me with script.

Regards Suhail Nedaria

Create the priority group activation in pool. You will achieve it.