Skip to main content

MongoDB topology

MongoDB is present on both nodes of the databases cluster, but with different roles:
  • cluster-n03active mongod service, part of replica set rs1 and typically the PRIMARY.
  • cluster-n04 – MongoDB binaries/tools are available, but there is no active mongod.service or /etc/mongod.conf under systemd.

MongoDB on cluster-n03

  • Version: db version v3.4.13
  • Service: mongod.service (enabled, active)
  • Binary / config:
    • Service command: /usr/bin/mongod --config /etc/mongod.conf
    • dbPath: /data/mongo
    • port: 27017
    • bindIp: 0.0.0.0
    • replication.replSetName: rs1
Useful commands:
ssh cluster-n03
systemctl status mongod
mongo --quiet --eval 'rs.status().members.map(m => ({name: m.name, stateStr: m.stateStr}))'
MongoDB on cluster-n03 is part of replica set rs1 and is typically the PRIMARY node used by applications.

MongoDB on cluster-n04

  • Version: db version v3.6.8 (tools installed)
  • Service:
    • mongod.service is not found under systemd.
    • /etc/mongod.conf is not present.
Implications:
  • This host may participate in the MongoDB topology in a different way (e.g. containerized mongod, alternate service name) or not at all.
  • Do not assume MongoDB failover to cluster-n04 without verifying the actual deployment.

Operational notes

  • Treat cluster-n03 as the main MongoDB node for now.
  • Before relying on cluster-n04 for MongoDB HA, confirm:
    • How (or if) it joins replica set rs1.
    • Where its data path and configuration live.
    • How applications discover and connect to the replica set.