Step to step for creating SRV connection string in mongodb Linux server

HI Team,

We have setup a replicaset in linux(centos) 1 Primary and 2 secondary. How to create SRV connection string in linux step by step.

Hi @Kiran_Joshy

A SRV connection string is backed by two types of DNS records; SRV records and TXT records.

Once you have a Fully Qualified Domain Name you will need to create SRV records.
One is needed for each replicaset member (target).
The TXT record is optional and specifies the replicaSet name and/or authentication database.

This page goes into it in more detail.
https://www.mongodb.com/docs/manual/reference/connection-string/#srv-connection-format

1 Like