PrepZone Logo
PrepZone
Back to Database

Database · Medium

How does a MongoDB replica set provide high availability?

DatabaseNoSQLSeniorMongoDB

Answer preview

A replica set is a group of mongod processes holding the same data: one primary that takes all writes, and secondaries that replicate it asynchronously. If the primary fails, the remaining members elect a new one, usually within 10–12 seconds.…