C100DBA practice question 7 of 25
In a sharded replicas set environment with multiple mongos servers, which of the following would decide the mongos failover?
Full set: 130 questionsmongos instances are stateless routers in a sharded cluster. They do not have an internal failover or election mechanism among themselves. High availability for the routing tier is achieved at the application level. The application's MongoDB driver is configured with a list of all mongos hosts. If the driver cannot connect to one mongos, it will automatically try to connect to the next one in the list, thereby handling the failover. This responsibility lies entirely with the client-side driver, not any server-side component.
A. A mongos instance is independent and stateless; it does not participate in or decide the failover of other mongos instances.
B. The mongo shell is a client application. Like other clients, it connects to a mongos but does not manage cluster-wide failover.
D. mongod processes (config servers or shard members) manage their own replica set failover but are not involved in mongos failover.
1. MongoDB Manual, Sharding, Sharded Cluster Components, mongos: "Clients connect to a mongos, which routes queries to the appropriate shards... You can run multiple mongos instances to balance the client request load. The client can connect to any mongos."
2. MongoDB Manual, Connection String URI Format, "Connect to Multiple mongos Instances": "To connect to multiple mongos instances, specify the hosts in the connection string. The driver or mongo shell will automatically attempt to connect to another mongos if it cannot reach the first one in the list."
Keep practicing
Take the free C100DBA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other C100DBA practice questions
- Question 1If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which…
- Question 2The oplog (operations log) is a special capped collection that keeps a rolling record of …
- Question 3‘$set' sets the value of
- Question 4What does the totalKeysExamined field returned by the explain method indicate?
- Question 5Which mongodb tools allow us to work with our data in a human readable format?
- Question 6Which of the following is incorrect statement about find and findOne operations in MongoD…
