While creating new connection on Mongo Compass the UI try to discover the entire replica set topology and connect to the primary/secondary IP.
Is there a way to create a DIRECT connection to an HOST/IP+Port just like the clients api and disable the topology discovery step?
From pymongo documentation: directConnection (optional): if True, forces this client to connect directly to the specified MongoDB host as a standalone. If false, the client connects to the entire replica set of which the given MongoDB host(s) is a part
If you don't want to connect to a replicaset, use a
mongodb
connection string (as opposed tomongodb+srv
), use a host IP / port, and drop the&replicaSet=
parameter.