I’m confused about MongoDB connection strings from SRV and Replica Set,
I have running Replica Set, and when i open the connection option by clicking on connect button, i can not see Replica Set connection string example or any kind of recommendation,
SRV records are a somewhat recent addition to the DNS protocol. See SRV record - Wikipedia.
It is not supported in old version of MongoDB. If you use a version that supports it, it is recommended that you use it as it simplifies thing on the client side. For example, if you add, remove or move a replica set member with the old non SRV style, you need to modify the connection string. With SRV you do not, because this information is retrieved by DNS queries.
For example with your cluster sandbox.3xqto.mongodb.net with Dig (DNS lookup) we can find the replica set name and by querying the TXT record. Which will provide the following answer:
authSource=admin&replicaSet=atlas-lht6qp-shard-0
The query for the SRV record is tricky since you have to prefix the cluster name with _mongodb._tcp and you will get:
_mongodb._tcp.sandbox.3xqto.mongodb.net. 59 IN SRV 0 0 27017 sandbox-shard-00-00.3xqto.mongodb.net.
_mongodb._tcp.sandbox.3xqto.mongodb.net. 59 IN SRV 0 0 27017 sandbox-shard-00-01.3xqto.mongodb.net.
_mongodb._tcp.sandbox.3xqto.mongodb.net. 59 IN SRV 0 0 27017 sandbox-shard-00-02.3xqto.mongodb.net.