Forum Discussion

FAZ_79699's avatar
FAZ_79699
Icon for Nimbostratus rankNimbostratus
Feb 13, 2012

Using App server as monitor for Web Server

Hello iRulers,

 

 

We have a web pool with two members. Having a requirement to put a web node down in pool when corresponding app server goes down (put web1 down when app1 goes down and vice versa) and to to implement the logic, I am thinking of the following iRule,

 

 

Rule1

 

 

if { [active_members pool-having-only-one-app-server-node1] == 0 } {

 

use node ip-of-the-other-web-server2

 

}

 

}

 

 

Rule2

 

 

if { [active_members pool-having-only-one-app-server-node2] == 0 } {

 

use node ip-of-the-other-web-server1

 

}

 

}

 

 

These rules would instruct the VS to use the other node (web2 if app1 is down)

 

 

Is there a simple logic anyone can think of to implement this?

 

 

Is there a posibility to use health of "app node" as a health monitor for web node?

 

 

Thanks.

 

8 Replies

  • I think instead of use node ip-of-the-other-web-server1

     

     

    using

     

     

    LB::down node ip-of-the-corresponding-web-server

     

     

    should produce the desired result...
  • Made it work via creating a monitor out of the app server and associated it to the web node.

     

     

    This is working and the need for an iRule did not arise.

     

     

    Thanks folks.
  • Having a requirement to put a web node down in pool when corresponding app server goes down (put web1 down when app1 goes down and vice versa) have you tried to specify Alias Address and Service Port in health monitor? monitor does not always have to check pool member which the monitor is assigned to.
  • Exactly. Thats how I made it deliver required logic.

     

     

    Thanks a lot nitass, I knew I would get atleast one response from you.

     

     

    Really appreciate it!!