I am pasting here the idea:
Using heartbeats in database tables is a very widely used concept for an application to determine whether two or more database nodes are in sync. Part 1 of this series of articles describes the basic scenario of using a heartbeat table in a simple master slave replication.
In a simple master->slave replication, an application would normally run reports on the slave node. How can the application ensure that the slave is uptodate? One method is by creating a simple table on the master database called HeartBeat (as an example) and have one TIMESTAMP/DATE field. A job (database job/server job) will run every 10 minutes and update this field with the current timestamp. This table is also replicated to the slave, so both nodes have a HeartBeat table. This is shown in the figure below:... read more