MongoDB DBA · Question 55 · Single choice

55. When querying a sharded cluster, which component of the cluster routes the query to the shard that contains the document that the query is looking for? Choose the best answer:

Answer options

  1. A.
    mongo client
  2. B.
    mongod
  3. C.
    mongos
  4. D.
    config server
  5. E.
    primary node

Answer confidence: High

Correct answer: C

Explanation language: Chinese

mongos 是分片集群的路由层:它根据 config server 上的 chunk 元数据把查询转发到持有目标文档的分片(无法定位时广播),并在需要时归并结果返回给客户端。mongod 只处理本分片范围内的数据,config server 只提供元数据、不参与业务查询的路由。

Papers containing this question

This question appears in 3 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗