Posted: 17 Jun 2015 4:52 EDT Last activity: 23 Feb 2017 6:14 EST
Agent Configuration on Multi Node environemnt
We have to Configure an agent in an environment where in we have multiple nodes. Currently I am using standard agent. I have to configure my agent such that say i have 10000 WO and i have 4 nodes, i have to distribute load equally among all the nodes(say 2500 each randomly or say 1-2500 and 2501 to 5000 etc) such that time taken for processing in minimal.
If i enable agent on all the nodes each WO is processed 4 times.
I have used a flag while one of the agent processing and once it is processed i will mark it as true and next time agent tries to pick it agent checks the flag and takes decision accordingly, then i am seeing locking issues and also i need to commit explicitly once the flag is set such that it wont be picked by other agent.
When using a Standard agent you must be creating queue items. Each queue item represents a work object that needs to be processed. Agents running on multiple nodes will distribute the load automatically and work on distinct queue items. Unless you are setting requeueOnSuccess flag , once the queue item is processed it gets deleted from the queue table. This way a work object will not be processed more than once.Standard Agents support Auto Queue management by default and you do not have to take explict code to handle multinode configuration.
One of our team members created a logic to distribute the load. Lets say there are 10 nodes. Create 1 agent per node, amounting to a total of 10 agents. Then enable 1 agent per node from the scheduler. Finally write custom Java code using public apis to distribute the file to a different agent.