Blog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2025 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/MongoDB
MongoDBhard

Write concern `w:1` vs `w:"majority"` — what’s the trade-off?

Tags
#write-concern#durability#replica-set
Back to categoryPractice quiz

Answer

`w:1` acknowledges once the primary accepts the write (lower latency, but higher risk on failover). `w:"majority"` waits for replication to a majority of nodes (higher durability, higher latency).

Related questions

MongoDB
Replica set elections: what happens during an election?
#mongo#replica-set#election
MongoDB
Read preference in replica sets: what does `primary` vs `secondary` mean?
#mongo#replica-set#read-preference
MongoDB
Read concern vs write concern: what do they control?
#mongo#consistency#read-concern
MongoDB
Read concern in MongoDB: `local` vs `majority` - what changes?
#mongo#read-concern#consistency
MongoDB
MongoDB read preference: what does it control (primary vs secondary)?
#mongo#replica-set#read-preference
MongoDB
What are MongoDB Change Streams and what do they require?
#change-streams#oplog#replica-set