iRule Help for Web front end and Backend Database server traffic to failover at same time
Hello,
I am looking to create an iRule for Web front end and Backend Database server traffic to failover at same time. The current topology is 2 Front end web servers and 2 back end database servers call them Web01 & Web02, and Database01 and Database02. In this build the 01's talk to the 01's and the 02's only talk to the 02's. The only traffic between the 01 and 02 servers is that the data from Database01 sync's to Database 02, but users would only talk to the 01 servers Primarily and if there was a failure then the users would be failed over to the 02/Standby. We have a Priority group in place that all user traffic is pointed to the 01 servers. The problem at hand is if the Web01 server were to go down because of diaster scenario and the Database01 server were still online by default the F5 would redirect the traffic to the Web02 server but the traffic would still be directed to the Database01 server because still online in which doesn't work with how users access the application. We would need something that the F5 would redirect all traffic if either of the 01 servers were to be down and stop traffic from going to any 01 servers and make it only go to the 02 servers until we were to find resolution of why either of the 01 servers went down. Any help on what syntax to use for the irule would be extremel helpful or any other recommendations as well.