[SERVER-9192] Replication topology configuration Created: 31/Mar/13  Updated: 31/Mar/13  Resolved: 31/Mar/13

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.2.3
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Aristarkh Zagorodnikov Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Irrelevant


Issue Links:
Related
is related to SERVER-7498 top level option in replica set to di... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

When building a replica set of 3 nodes (db1, db2, db3), when db1 is primary, internal replication logic usually builds a chain db1 -> db2 -> db3 instead of db1 -> db2 + db1 -> db3. This leads to greatly increased latencies if w:all (or w:majority with sets of 4+ members) is used. I know about replSetSyncFrom command, but it's only a temporary measure. I understand that this chaining is done to reduce load on master and (probably) reduce amount of reconnections whem primary goes down. I would strongly suggest a method (RS configuration item, command-line/configuration option, etc.) to either specify a node that can handle all replication needs or just globally override the algorithm so it always preferse primary as a sync source.
Since building robust applications involves writes being done with w:majority (to minimize general data loss and rollbacks), a method to reduce "visible" replication latency is certainly a must.



 Comments   
Comment by Aristarkh Zagorodnikov [ 31/Mar/13 ]

Thank you for the clarification.

Comment by Tad Marshall [ 31/Mar/13 ]

Yes, this option (SERVER-7498) was underdocumented and somewhat broken (see SERVER-7817) before version 2.4 (now backported to 2.2.4-rc0), so it was easy to miss. It should do what you want in version 2.2.4 when it is released.

Comment by Aristarkh Zagorodnikov [ 31/Mar/13 ]

Yeah, looks so: https://jira.mongodb.org/browse/DOCS-1301.
Well, looking forward to 2.2.4 release (not yet ready for a 2.4 upgrade, since it involves manual config servers upgrading process).

Comment by Aristarkh Zagorodnikov [ 31/Mar/13 ]

It appears that it is supported only in 2.4 (maybe in 2.2.4 also, didn't check). Well, that's another reason to upgrade.

Comment by Aristarkh Zagorodnikov [ 31/Mar/13 ]

That's what you get for being lazy with reading docs =) Thank you very much, Tad, this is exactly what I was looking for.
Sorry for not paying enough attention, please close this case.

Comment by Tad Marshall [ 31/Mar/13 ]

Have you looked at the chainingAllowed setting for replica set configuration?

http://docs.mongodb.org/manual/reference/replica-configuration/#local.system.replset.settings.chainingAllowed

When chainingAllowed is false, secondaries can replicate only from the primary.

Generated at Thu Feb 08 03:19:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.