How can I check if there is latency between primary and secondary on SQL Server 2016. Are there any scripts available?. What in specific you look for in the availability dashboard. For example, I see all the db's in green ( healthy) however found out that we still had 40 secs latency. Do you look at hardened LSN or something like that? please advise any best practices.
I am aware if could be due to network latency or amount of data or Performance issues. There could be more reasons, however I want to be able to tell if there is latency even in secs. please let me know your thoughts!