What does seconds_behind mean?

The AMPS statistics database and administrative interface provide a seconds_behind metric to indicate where in the transaction log a given process is. The seconds_behind number is taken by subtracting the timestamp for that point in the transaction log from the current time: this is a simple, efficient way of communicating a point in the transaction log.

For example, if the current time is midnight on October 1, 2020 UTC (a timestamp of 1601510400), and the seconds_behind value for a destination is shown as 3600, this means that the last message acknowledged by the downstream replication instance was recorded in the transaction log at September 30 at 11:00 PM UTC (a timestamp of 1601506800). This does not (necessarily) mean that the downstream instance has been unavailable for that period of time, and it does not indicate any estimate of the amount of time it will take for any messages after that point to be acknowledged by the downstream instance. Likewise, the seconds_behind metric does not indicate the volume of messages between that point in the transaction log and the current end of the log.

This metric does, however, give you a way to see where in the transaction log the replication process is currently at.

(In fact, since replay from the transaction log is often faster than the rate at which messages were originally published, processes that report seconds_behind are typically expected to "catch up" to the end of the transaction log under normal operation.)

Last updated