[*] URGENT! Issue connecting to mongoDB Replica Set through Node v18.18.0

When connecting to a replicaset the hosts in the connection strings are a seed list.

The client discovers the rest of the hosts in the replicaset from the first seed node it can connect to and will then connect to the primary.

The hostnames in the replicaset configuration are the ones that will be used after the initial discovery. These are the hostname provided in rs.initiate() or rs.add().

1 Like