We have two MongoDB clusters — Cluster A and Cluster B.
Our objective is to keep both clusters in sync ensuring that any data changes in one cluster are mirrored in the other.
To achieve this, we’re currently using MongoDB’s mongosync
utility:
From A to B: When any data changes occur in Cluster A, mongosync
pushes those changes to Cluster B.
From B to A: We also have a reverse setup, so that changes in Cluster B sync back to Cluster A.
Challenge Faced
While this bi-directional syncing works in principle, we’ve observed a key limitation:
Only one sync operation happens at a time.
If mongosync
is running from A → B, any reverse syncing (B → A) is blocked until the first operation completes, and vice versa.
Discussion Point
Is there a way to allow parallel sync operations — so that changes in A and B can be propagated simultaneously, without waiting for the other direction to complete?