Forum Discussion

Narendra_26827's avatar
Narendra_26827
Icon for Nimbostratus rankNimbostratus
Jul 06, 2011

Creating iRule to disable pool if any subsystem pool member fails

Hi,

 

 

We have a java application that actually runs on linux machine. It has three subsystem processes running on different ports 8086, 8087 and 8088 on single ip address.

 

 

We have created a virtual server pointed to port 80 internally pointing to nginx on that particular machine, where we have these three sub java processes.

 

 

For these three subsystems we have created separate pools and a separate pool for nginx which is default pool in the virtual server.

 

 

We have created a irule that will redirect the requests accordingly to each subsystem and applied to this virtual server like

 

 

if /api/gateway* url it should go to gateway pool running on on 8087

 

 

if /api/channel* url it should go to channel pool running on 8088

 

 

if /api/space* url it should go to space pool running on 8089

 

 

Now we want to create a irule which will actually check these three subsystems on that single node and if each of those are not running or getting failed then the request should not go to other two subsystems.

 

 

Can anybody help or provide any ideas on creating that irule?

 

 

Thanks.

 

  • Hi Narendra,

     

     

    You can configure a separate monitor with the destination port hard coded for the gateway, channel and space services. Then assign all three monitors to each pool with the availability set to 3. If any of the monitors fail, all three services will be marked down.

     

     

    Aaron
  • Thanks for the quick reply!

     

     

    I have one doubt here, suppose we have multiple nodes to each of those sub system pools like this

     

     

    192.168.1.2:8087 |

     

    192.168.1.3:8087 ----> gateway pool

     

    192.168.1.4:8087 |

     

     

    192.168.1.2:8088 |

     

    192.168.1.3:8088-----> channel pool

     

    192.168.1.4:8088 |

     

     

    192.168.1.2:8089 |

     

    192.168.1.3:8089-----> space pool

     

    192.168.1.4:8089 |

     

     

    Then suppose any member of any of the subsystem pool has failed suppose 192.168.1.2:8087 has failed then request will not go to 192.168.1.2:8088 and 192.168.1.2:8089 node

     

    but will the request go to 192.168.1.3 and 192.168.1.4 nodes? According to your concept above?

     

     

    Sorry if i have asked anything wrong.

     

     

    Thanks.
  • The idea behind the hard coded destination monitor is that you're saying for each pool member IP, monitor port 8087, 8088 and 8089. If any of the three monitors on that IP fail, then mark down all three ports for that IP. It won't affect other pool member IP's.

     

     

    Aaron