MongoDB Quiz

Connect with

Rolling maintenance

Which of the following are considered part of best practices when doing rolling maintenance on a replica set? Check all that apply.

a) Perform maintenance on one secondary at a time.
b) Ensure your replica set has a minimum of three data-bearing secondaries.
c) Shut down a secondary and restart it without –replSet to perform maintenance.
d) Restart secondaries on a different port when performing maintenance.
e) None of the above. MongoDB does not recommend rolling maintenance.

Ans: a, c and d

Driver options

Suppose your application is making use of a cursor to read a large amount of data from a sharded cluster. The mongos your application is talking to goes down and the application connects to another mongos. Which of the following will occur?

a. The new mongos will continue to use the same cursor seamlessly.
b. The cursor will be lost and an exception will be raised.
c. The cursor will be reset, and the query will start over at the beginning of the result set when getmore is called next.
d. The cursor will skip one getmore call, so some documents in the result set will be skipped.
e. The cursor will behave as if it reached the end of the result set.

Ans: b

Connection management in replica sets

Which of the following are types of connections you might find in a replica set? Check all that apply.

a. Heartbeat connections between members
b. Connections from secondaries to their sync source in order to tail the oplog.
c. Connections from secondaries to their sync source to keep track of where they are in the oplog
d. Administrative connections from drivers to all members
e. Connections from clients reading from secondaries

Ans: all ( a,b,c,d and e)

Which of the following are true for rollbacks occurring during a replica set failover? Check all that apply.

a. A MongoDB instance will never rollback more than 300MB of data.
b. Manual intervention is required to restore data that was rolled back by a MongoDB instance.
c. A rollback can’t occur if w=”majority” is acknowledged to the issuing client.

Ans: all ( a, b and c)

In the MongoDB, which of the following is true of SSL? check that all apply.

a. SSL encrypts all communication between mongoD server
b. SSL always requires a key-file on each machine
c. SSL prevents man-in-the-middle attacks
d. SSL compress data communication between servers

Ans: a,c and d

In a sharded cluster, which of the following can keep large chunks from being split as part of MongoDB’s balancing process? Check all that apply.

a. Frequent restarts of all mongos processes relative to the number of writes
b. If there are not enough distinct shard key values
c. If one of the config servers is down when a mongos tries to do a split
d. The average size of the documents in the chunk
e. The number of shards in the cluster

Ans: a, b and c

Connect with

Leave a Comment

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