Database Redundancy ( Failover Datasource )

Hi all,

Image above is the database configuration in the gateway which is the Failover Datasource and Failover Mode. May I know that anyone use this before and how does it work actually ?

Currently, I have two NAS (Database) and two of my database actually have the replication features which means all my data will be replicate within these two database. In my case, it is necessary to use the failover datasource so I would like to understand more about this.

For example, if my reporting modules (Tag Historian Query) is getting the data from Database 1 then when the Database 1 down. Will my report still function correctly or I need to update the Tag Historian Query in my Ignition Designer.

Thanks in advance.

In almost all scenarios, I would recommend relying on your RDBMS’s failover rather than Ignition’s failover settings.
Many RDBMS failover scenarios offer some kind of ‘virtual IP’ or hostname; Ignition connects to that as a client, and if there’s a problem with DB A, queries will automatically be rerouted to DB B.

Ignition’s failover is basically the same idea, but it’s “dumb”; all it does is see that a query to DB A failed and immediately attempt to run the same query on DB B. You don’t need to change anything in your queries or project settings, because to the rest of Ignition, it attempted a query to A and it succeeded; the only place that “knows” something failed is the actual database connection.

However, the big downside is that this is direct translation of queries, thus DB A and DB B must be exactly identical for queries to have any hope of succeeding. If they’re exactly identical, then you’re already using some form of DB replication…and usually those do a much better job of keeping track of which DB is alive anyways - which is why I generally recommend not using Ignition’s failover settings at all.