Knowledgebase
Identifying which node should execute a particular trigger in a high availability cluster
Posted by John Villanueva on 31 March 2018 06:07 PM
One of the issues we have experienced in the past is with customers running their servers in High Availability environments.  They typically have 2 or more server using a shared Datastore (relational db).  The problem they run into is that depending on how these are configured you may have some Triggers that are fired on each server when that is not the intent.  For example, if you are using a Directory Monitor File Added event and all MFT Server instances are polling the same directory then the event would be raised on each server and the Triggers on each server would respond appropriately.  This can result in files being processed multiple times (i.e. once by each server).  To address this issue in the past we have often asked customers to place a flag file on the server they want to be responsible for handling these events and then use a GetFileExists(/path/to/flagfile) Condition in their trigger.  This would ensure that only a single server (the one that has the flag file) processed the event. 
 
The new ApplicationInstanceId event property, which was first introduced in v10.2, removes the need for this flag file.  Additionally it will tell you which server is responsible for generating the event.  Rather than using a flag file you can now have a Condition as follows:
 
ApplicationInstanceId = "idvalue"
 
where idvalue is the application instance id for the server.  Each server has a unique instance ID that is generated when the server is installed and can be found in the file etc/application-instance.id
 
This is a simple text file and may be modified to any value of your choosing.  If file does not exist then a random ID will be generated.  When viewing recent executed Trigger event details you will also see the ApplicationInstanceId property which can assist you in knowing which MFT Server instance was responsible for executing the trigger.
(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako fusion