Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which of the following statements are true about MongoDB replication? [closed]

  1. The minimum sensible number of voting nodes to a replica set is three.
  2. MongoDB replication is synchronous.
  3. The Mongo shell is capable of attaching to a replica set and automatically failing over.
  4. By default, using the new MongoClient connection class, w=1 and j=1.
  5. The oplog utilizes a capped collection.

I have selected 1,3,5 in answers but still get wrong answers. can anyone help me which one is right options for replication?

like image 773
Suresh Avatar asked Jun 19 '13 11:06

Suresh


People also ask

What is true about replication in MongoDB?

What is MongoDB Replication? In simple terms, MongoDB replication is the process of creating a copy of the same data set in more than one MongoDB server. This can be achieved by using a Replica Set. A replica set is a group of MongoDB instances that maintain the same data set and pertain to any mongod process.

Which of following statements are true about MongoDB?

6. Which of the following true about mongoDB? Explanation: MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability. 7.

Which of the following are uses of replication in MongoDB?

Replication provides redundancy and increases data availability with multiple copies of data on different database servers. Replication protects a database from the loss of a single server. Replication also allows you to recover from hardware failure and service interruptions.

How does MongoDB replication work?

With MongoDB, replication is achieved through a replica set. Writer operations are sent to the primary server (node), which applies the operations across secondary servers, replicating the data.


2 Answers

Only 1st and 5th are true.

2) MongoDB replication is *a*synchronous.

3) For mongo shell, we need to do manual fail over.

4) MongoClient connection class default write concern is w=1 and j=0.

like image 167
Chintak Chhapia Avatar answered Sep 28 '22 06:09

Chintak Chhapia


  1. Is correct, you can read more about here: http://docs.mongodb.org/manual/core/replica-set-architectures/
  2. Not correct. MongoDB replicattion is async.
  3. Not correct. Once connected to replSet you need manually shutdown sever to cause fail over.
  4. Not correct. You can read MongoClient doc here: http://mongodb.github.io/node-mongodb-native/driver-articles/mongoclient.html Default value's {w: 1, j:false}
  5. Correct. OpLog is a capped collections.
like image 29
rock3t Avatar answered Sep 28 '22 04:09

rock3t