MongoDB's replica set architecture is built on the Raft consensus algorithm, which handles leader election, log replication, and commitment. The primary node acts as the Raft leader, managing all writes and propagating them via the oplog to secondary nodes. Elections are triggered by missed heartbeats, with majority voting
Sort: