C100DBA Sharding Practice Question
A multi-document transaction is being executed across multiple shards. Which component is responsible for coordinating the transaction and ensuring the all-or-nothing property?
⚠ Common exam trap
Candidates often mistakenly believe that the primary shard or the config servers coordinate multi-document transactions, ignoring the central role of the mongos router in the process.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The mongos router that initiated the transaction.
Multi-document transactions in a sharded cluster are coordinated by the mongos router where the transaction was initiated. The mongos acts as the transaction coordinator, using a two-phase commit protocol to ensure consistency across the participant shards. This allows applications to maintain ACID guarantees even when data is distributed across a horizontally scaled environment.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The primary node of the config server replica set.
Why it's wrong here
Config servers store metadata and cluster configuration but do not coordinate application-level transactions. Their role is to provide the routing information that allows the mongos to find the relevant shards. The actual logic for managing the transaction state and the two-phase commit resides on the mongos instance.
- ✓
The mongos router that initiated the transaction.
Why this is correct
The mongos instance serves as the coordinator for the distributed transaction. It tracks which shards are involved, manages the transaction's lifecycle, and executes the commit or abort protocol across all participants. This centralized coordination is necessary to guarantee that the transaction either commits on all shards or none.
- ✗
The shard that contains the first document accessed in the transaction.
Why it's wrong here
While the shards involved in a transaction are participants, no single data shard acts as the global coordinator for a distributed transaction. Each participant shard is responsible for its local part of the transaction, but the overall coordination and the decision to commit are managed by the mongos router.
- ✗
A specialized 'Transaction Manager' node that must be configured.
Why it's wrong here
MongoDB does not have a separate 'Transaction Manager' node type. The transaction coordination functionality is built into the existing mongos and mongod binaries. This design simplifies the cluster architecture by reusing the established communication paths between the query routers and the data shards for transaction management.
About these practice questions
One of 222 original C100DBA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official MongoDB exam blueprint
This C100DBA practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DBA exam.