Replication Lag on Secondary in 3 node mongodb Cluster

Hi Mongo DB Team,

We have a 3-node MongoDB Replication cluster with mongo version 4.0.6 We are facing issue of one of the secondary servers is lag behind the primary (sometimes 2-5 minutes).
Kindly help us and suggestions for resolving the issue.
As we refer log we found something like 2018-11-16T12:31:35.886-0500 I REPL [repl writer worker 13] applied op: command { … }, took 112ms on secondary nodes.

We are struggling a lot kindly guide thanks in advance!!!

Hi @Nagesh_Kamble and welcome in the MongoDB Community :muscle: !

Are the 3 nodes identical (same RAM, CPU, disks, …)?
Are the 3 nodes identical in content? Have you created indexes on some nodes and not on others?
What’s the latency between the nodes? Is one of them really far away from the others? Do you have recurrent transient network issues?

Did you identify why that particular command is slow to replay on the secondary nodes? Missing an index maybe?

Cheers,
Maxime.

2 Likes