You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -151,11 +151,60 @@ option to ``True``. You can do this in two ways: by passing an argument to the
151
151
"directConnection=true")
152
152
client = MongoClient(uri)
153
153
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. Additionally, if you enable
159
+
the SRV connection format, {+driver-short+} automatically re-scans for new hosts without
160
+
having to change the client configuration.
161
+
162
+
The following code shows a connection string that uses the SRV connection format:
163
+
164
+
.. code-block:: python
165
+
166
+
uri = "mongodb+srv://<hostname>/"
167
+
168
+
To learn more about the SRV connection format, see the :manual:`SRV Connection Format </reference/connection-string/#std-label-connections-dns-seedlist>`
0 commit comments