Forum Discussion
iRule Help for Web front end and Backend Database server traffic to failover at same time
Hi bob3,
you can achieve this without iRules but with a good combination of health check monitors and priority group activation.
- Create two pools, lets call them pl_web and pl_sql. Add the web servers to pl_web and the db servers to pl_sql. Use priority group activation, to make sure all the traffic goes to the 01 server.
Do not add a monitor to the pool. - Create four health check monitors, one for each server.
You can do this by specifing the Alias Address in each monitor. This way the monitor will only check the server with the IP specified in the alias field. - Add the monitors to the pool members like this:
Web server 01 will have the monitor for itself and DB server 01
DB server 01 will have the monitor for itself and web server 01
Web server 02 will have the monitor for itself and DB server 02
DB server 02 will have the monitor for itself and web server 02
Go to Local Traffic ›› Pools : Pool List ›› pl_web. Click on the Members tab. Click on the first member.
Add member specific monitors as described above, two per server. Make sure Availability Requirement is All (default).
Repeat this for all four servers in the two pools.
With this configuration the web server 01 will go down if either itself or the DB server 01 fails. With priority group activation you make sure all the goes only to either one pair or to the other. And priority group activation will also ensure that the failback works.
KR
Daniel
- bob3Mar 16, 2023Altocumulus
Thank you Daniel. We will try your recommendations.
- bob3Mar 16, 2023Altocumulus
Daniel,
Actually another question. What if wanted to put a thresold for this. Example if the Web01 is down but we don't want to it to failover till maybe 10 minutes later? In the case we can resolve the issue before fully failing over.
- PauliusMar 16, 2023MVP
bob3 I believe the only option you have for that is to increase the interval and timeout of the health monitor to accomodate a 10 minute failover. Is this because you expect the server to come back online with a 10 minute window if it does fail a health monitor?
- bob3Mar 16, 2023Altocumulus
Paulius,
Yes. We are trying to iron out the logistics on the timing and comfortablity of the SLA in an on and off hour scenario. During the day we have staff that can monitor the web and database servers in which may require a simple reboot to fix and get everything back up and running, whereas in a off hour scearnio we would want it to failover almost immediatetly and troubleshoot when we have the proper resources online.
Is there a way to have almost a time frame when either the on or off hour scenarios could occur. Say from 8 am to 5 pm the 10 minute wait applies, and from 5 pm to 8 am the automatically failover occurs?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com