Forum Discussion

Mike_Schiltz_64's avatar
Mike_Schiltz_64
Icon for Nimbostratus rankNimbostratus
Sep 30, 2005

developing monitors to start services

We have applications developed by our company (Tideworks) that are not cluster aware. The architecture is client server, and we want to use BigIp to direct traffic to the primary, and only to the secondary if the primary fails. The server component is essentially an intermediary between the client app and an oracle database; and it cannot run on both server nodes at the same time - only one service can be connected to oracle. We would like to develop something via iControl that will check to see if the service is up, report if its not back to BigIp, and have BigIP start the service on the standby node and direct traffic to it. Is this possible with iControl?
  • With iControl, you can automate the on/off for each of your servers. I'd look at the Pool and PoolMember interfaces to be able to enable/disable pool members.

     

     

    I'm a little unclear as to what you mean by having BIG-IP "start the service on the standby node". If by this you mean, have BIG-IP enable routing to the standby server while removing routing to the primary, then the answer is yes. If you are asking whether we can trigger internal services on the standby node (ie start an application, etc), then that is beyond the scope of BIG-IP or iControl.

     

     

    Not knowing what application you are exposing to your users, you could create a health monitor and have BIG-IP do all this transparently. But, that would depend on whether BIG-IP had a supported monitor that made sense for your application.

     

     

    Typically, customers who have special applications, will create a "monitoring" application that constantly polls the node to determine their health. If it finds one is not doing so well, it will use iControl to inform BIG-IP to take the offending node out of rotation. When the monitoring application finds that the nodes health is back again, it will re-provision the node in BIG-IP's load balancing.

     

     

    I'm not sure if this answered your question directly or it. If not, if you could elaborate a bit more on exactly what steps you want to perform (ie. what does service down mean?, etc) then I might be able to shed some more light.

     

     

    Good Luck!

     

     

    -Joe
  • Hi,

     

     

    I have the very same requirement and hope I can find a solution. Perhaps I should explain in more detail though:

     

     

    First, we have a two node BizTalk 2004 farm. Each server is active with respect to being online, running, processing workflows. However, only one server can be running the single sign on (SSO) service; no more than one server, no less than one server.

     

    Additionally, we have an FTP connector; again, this must run on no more and no less than one node at a time.

     

     

    Both the SSO service and the FTP connector exist as Windows Server services; thus we designate one of the two servers as a "primary" and the other BizTalk server as a "secondary". On the primary, the SSO and FTP services are set in the Windows service control panel to "automatic" startup upon system reboot so under normal operating conditions this "designated primary" is always running these two windows services.

     

     

    On the "designated secondary" server, those services exist and if started, they would operate normally as long as they are the only instances running. If, by chance, the services on both the primary and secondary are running, the whole darn things breaks.

     

     

    So, bear in mind, the concept of "designated primary" and "designated secondary" only pertains to these services; other things like the HTTP and AS2 protocol daemons (aka IIS sites) on both servers are 100% identical, always running, and accepting equal numbers of sessions.

     

     

    So, consider this: if the services on the secondary are set to "manual start" and the services on the primary are set to "automatic start" and both servers are booted and running, everything works like a champ. Now, if the primary server fails, we want the F5 BigIP v9 to identify this situation, and then somehow trigger the startup of those two Windows services on the remaining node in the designated secondary.

     

     

    So the scenario boils down to us having bi-polar servers (they each contain stateless HTTP cluster-friendly functions as well as this active/passive quorum-like situation). We want the F5 to:

     

    1. Sense that the primary is down

     

    2. Remove the primary from the pool

     

    3. Login to the secondary

     

    4. Start two services on the secondary

     

     

    If and when the primary comes back online, we also want to shut down the services on the secondary to make way for the "automatically started" services on the primary.

     

     

    Long story, rather simple problem, yet I see no functionality in the F5s that can do this natively. I have an idea with regards to building a HTTP or other monitor that "touches" both the primary and secondary servers every couple minutes and the "touch" results in a server-side script being initiated on both servers wherein the scripts "naggle" for a quorum and the winning script gets the right to start it's instances of the two services (of course the script would have to be smart enough to determine if the services are already running and then pause).

     

     

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    You can build a simple shell script and apply it as an external monitor to kick off a server-side script on node failure.

     

     

    Sample monitor may be found on the LTM filesystem @ /usr/bin/monitors/sample_monitor

     

     

    If you build it to accept the IP address of the other server in as a variable, you can use the same monitor for both nodes.

     

     

    I'd recommend using a status file written to /var/run to maintain awareness between script instances of the last known status, so we are only kicking off the startup/shutdown scripts on status change.

     

     

    You'll probably also want to have only the Active unit kick off the startup/shutdown scripts. (Or you could have only the Active unit run the whole script by inserting a conditional exit near the beginning of the script.)

     

     

    HTH

     

    /deb

     

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    No problem, I'm glad I could help.

     

     

    I should probably point out that:

     

     

    1) External monitors are not supported under your F5 Support agreement, so if you run into difficulty, Suport can't help you.

     

    and

     

    2) This thread is now far off topic for this forum.

     

     

    So if you end up needing assistance with implementing the script, your options for help from F5 are somewhat limited at this point, consisting mostly of engaging with our Consulting organization on a for-fee basis.

     

     

    Good Luck!

     

    /deb