liveBook · Manning

Chained replication

As explained in MongoDB 8.0 in Action, Third Edition

Chained replication is a replication topology in which a secondary copies operations from another secondary instead of directly from the primary.

Chained replication lets a MongoDB secondary copy oplog entries from another secondary instead of directly from the primary. A secondary may choose this target by ping time, using the nearest available member. section 9.1.3

Use the topology with these trade-offs in mind:

  • Reduce load on the primary by distributing replication work across secondary members. section 9.1.3
  • Watch for increased replication lag when the network topology makes the secondary-to-secondary path slower. section 9.1.3
  • Inspect replica-set health with db.getReplicationInfo(), which reports oplog capacity, usage, and time coverage on M10 clusters and larger. section 9.1.3

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains target selection and operational trade-offs, then stops short of configuration procedures.
Examples
Uses oplog documents and db.getReplicationInfo() or db.printSecondaryReplicationInfo() output to inspect replication activity and lag.
What it assumes
Requires understanding MongoDB replica-set members, primary-secondary relationships, and oplog entries.
What you can do after
Diagnose replication status with MongoDB oplog and secondary-replication information commands.
How it connects
Connects replica sets, primary and secondary members, oplog collections, ping time, and replication lag.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.