We are going to build a cluster server for applications.
I just wondered how the scheduled agent work on the cluster servers. I don’t want the agent on both servers running. Only if one server is down, then application fail over to the cluster server, the schedule agent start to run.
How let it work??
Subject: How will scheduled agent work on the cluster server (failover)?
Agents do not failover. The agent runs on the server where it’s been designated to run.
LEI’s latest versions can failover a “Scripted Activity” agent (but if the server crashed in the middle of its run they will start the agent over).
Or you could set the agent to run on all servers, and add code to try to do your own failover. Have a rule to decide whether the agent should run on the current server, and if not, exit the agent.
Of course, this is not a simple rule to test. How do you know whether another server in the cluster is down, or might just be slow to respond? If you decide that another server is down and start to run the agent for it, how do you know it’s not in the process of coming up and about to start running the agent itself at the same time?
Maybe the best thing to do is have a separate copy of the agent for each server, set to run at staggered times. The versions running on different servers will communicate with each other by means of a timestamp document. The first thing the agent does when it starts, is locate the timestamp document and check the time on it. If that time is recent, the agent exits. Else, it updates the document with the current timestamp, and does the rest of its work.
There may still be some issues with replication – if the server just started up, is the information in the timestamp document current? But I’ll let you test and work out those details…
I would suggest running on all servers and using locking on some special document to make sure only one server at a time performs the agent processing, but it seems to me this gives you a single point of failure in the master locking server. I’m not sure whether there’s a cluster-sensitive locking functionality – haven’t really messed with this.
Subject: RE: How will scheduled agent work on the cluster server (failover)?
One small correction - one type of agents does support fail over “before delivery mail” dynamicly fails over to other members of the cluster.
In addition to Andre’s post you can try searching this forum on ‘agent’ and ‘cluster’ as well as ‘agent’ and ‘failover’. This topic has been discussed many times in the past with a lot of good info.
Agent FAQ has information on agent failover, including an article which describes how agent failover was implemented by Domino Workflow product. Agent FAQ is under Resources in the right hand side column.