Skip to content

Commit 8011909

Browse files
committed
DOCSP-46697: SRV record section
1 parent 7609c5a commit 8011909

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/connect/connection-targets.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,20 @@ option to ``True``. You can do this in two ways: by passing an argument to the
151151
"directConnection=true")
152152
client = MongoClient(uri)
153153

154+
DNS Service Discovery
155+
---------------------
156+
157+
To use DNS service discovery to look up the DNS SRV record of the service you're connecting to,
158+
specify the SRV connection format in your connection string. The following code shows
159+
a connection string that uses the DNS service discovery option:
160+
161+
.. code-block:: python
162+
163+
uri = "mongodb+srv://<hostname>/"
164+
165+
To learn more about the SRV connection format, see the :manual:`SRV Connection Format </reference/connection-string/#std-label-connections-dns-seedlist>`
166+
guide in the {+mdb-server+} manual.
167+
154168
Troubleshooting
155169
---------------
156170

0 commit comments

Comments
 (0)