Redundancy in module development

Hello everyone,

My module has some tasks scheduled synchronously in the gateway (reading from tags, inserting calculations into a database, etc.) and some project resources. I was wondering what should I take into consideration to make the module redundancy-proof (if the master gateway fails, the module should work on the redundant gateway). ¿Does anyone have any experience/advice on this topic?


1 Like

You need to use the Redundancy State Listener:

import com.inductiveautomation.ignition.gateway.redundancy.types.RedundancyState;
import com.inductiveautomation.ignition.gateway.redundancy.types.RedundancyStateListener;

code snippets:

    public void redundancyStateChanged(RedundancyState redundancyState) {
        logger.debug("Redundancy State Changed to %s",redundancyState.getActivityLevel().toString());
            this.isActive = true;
            this.isActive = false;

    public void redundancyConnStatusChanged(ClusterPeerConnectionStatus clusterPeerConnectionStatus) {


EDIT: You have to implement the logic internally but these hooks let you know what state the Gateway is in. This works well for my SNMP Driver that I wrote.


So among other things, I would need to startup my module once the redundancy kicks in and shut it down once the master is up again?

In addition to the RedundancyStateListener described by @brandon1, you may also want to register a RuntimeStateProvider with the context’s RuntimeStateManager. This is the tool that facilitates regularly moving current state from the active to the inactive peer, minimizing the bump on failover.

1 Like

Got it, thanks!