MongoDB Quiz

Connect with

MongoDB questions
MongoDB questions for practice series is used for cracking your MongoDB interview. I tried to put together some questions in different sections of mongodb, this has been collected while studying mongodb.

Network Errors

Questions. What are the reasons why an application may receive an error back even if the write was successful. Check all that apply.

a) The network TCP network connection between the application and the server was reset between the time of the write and the time of the getLastError call.
b) The MongoDB server terminates between the write and the getLastError call.
c) The network fails between the time of the write and the time of the getLastError call
d) The write violates a primary key constraint on the collection and must be rolled back.

Ans: a, b and c

Introduction to Replication

What is the minimum original number of nodes needed to assure the election of a new Primary if a node goes down?

Ans: 3

Replica Set Elections

Which types of nodes can participate in elections of a new primary?

a) Regular replica set members
b) Hidden Members
c) Arbiters
d) Lawyers

Ans: a, b and c

Write Consistency

During the time when failover is occurring, can writes successfully complete?
a) Yes
b) No

Ans: No


Connect with

Leave a Comment

Your email address will not be published. Required fields are marked *