MongoDB_Official
alexbevi's profile
Alex Bevilacqua@alexbevi•Feb 10
290
MongoDB's profile
Post cover image

{ w: 1 } Asynchronous Writes and Conflict Resolution in MongoDB

From dev.to•Feb 10•10m read time

MongoDB uses Raft-inspired consensus for both leader election and data replication, guaranteeing durability and strong consistency by default with `w:majority` write concern. However, you can trade consistency for performance using `w:1`, which enables asynchronous replication but risks split-brain scenarios during network partitions. When a partition heals, MongoDB deterministically chooses the majority branch and rolls back operations from the losing side, preserving them as BSON files for manual conflict resolution. This rollback mechanism (Recover To a Timestamp) distinguishes MongoDB from vanilla Raft, allowing it to support lower latency, multi-region deployments, and migration workloads while maintaining auditability.

35 Impressions
alexbevi's user avatar
Alex Bevilacqua
@alexbevi
Joined Nov 7. 2024
290
MongoDB's profile

MongoDB

Verified

Lead Product Manager, Developer Experience @ MongoDB

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard