MongoDB DBA · Question 485 · Multiple choice

2. What information will be returned by rs.status() when it is run on a replica set node? Check all that apply:

Answer options

  1. A.
    The IP address/hostname and the port
  2. B.
    Heartbeat statistics for each node in the replica set
  3. C.
    Whether each node in the replica set is a primary or a secondary

Answer confidence: High

Correct answer: A, B, C

Explanation language: Chinese

rs.status() 返回 members 数组,每个成员包含 host(主机名/IP 加端口,A)、成员之间的心跳与复制延迟等统计信息(B),以及 stateStr 表示的角色(PRIMARY/SECONDARY/ARBITER,C)。“每个节点是 primary 还是 secondary”就对应 stateStr 字段,故三项都会返回。

Papers containing this question

This question appears in 1 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 ↗