The Estimated Data Loss metric in Foglight helps database administrators understand how far behind a secondary SQL Server replica is compared to the primary replica. This is important when using Always On Availability Groups, especially during failover situations.
This metric is calculated by comparing the last commit time on the primary replica with the last commit time on the secondary replica. If the secondary is behind, it means some data changes haven’t been copied over yet. This could lead to data loss if a failover happens before the secondary catches up.
If the secondary is up-to-date, the value will be 0 seconds. If it's behind, the value will show how many seconds of data could be lost.
To reduce or eliminate estimated data loss:
Use Synchronous Commit Mode
This ensures that transactions are committed on both primary and secondary replicas at the same time.
Monitor Redo and Send Queues
Large queues may indicate performance issues or network delays.
Check System Performance
Ensure that the secondary replica has enough resources (CPU, memory, disk speed) to keep up with the primary.
Use Foglight Alerts
Set up alerts in Foglight to notify you when estimated data loss exceeds a safe threshold.