Please tell me what is FOLLOWER_LAG_MS?

We are investigating the follower_lag_ms metric of YugabyteDB that can be obtained with Prometheus.

However, I haven’t found a document to see what this shows.
When I asked Google Gemini and Chat GPT, I got the following explanation. Is this roughly correct?

  • If this value is low, “The follower node is following the leader node almost in real time.”
  • If this value is high, “There may be a replication delay and the follower node may be holding old data, and High availability and consistency can be affected.”

I am currently creating a cluster of 3-4 nodes of YugabyteDB 2.25, and I plan to write the data and use follower_lag_ms to determine how long it will be replicated to other nodes.

Hi @ytooyama

When everything fails, I clone the repo and search through the source code or github (issues,commits). In this case I found Calculate follower staleness by using replicate messages timestamp · Issue #4868 · yugabyte/yugabyte-db · GitHub

The amount of time since the last UpdateConsensus request from the leader

This field is used to know if a follower is lagging behind and check if it has some hardware/network issues.

1 Like

Thanks dorian.
I understand it very well.