Skip to content

DOCSP-47044: Polling DNS SRV records #646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions source/connection/connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,8 @@ figure explains each part of a sample connection URI:
:alt: An example of a connection string that demonstrates the protocol, credentials, hostname or IP, port, and connection options

In this example, you connect to an Atlas MongoDB deployment that has a
DNS SRV record. For more details, see the :manual:`DNS Seed List
Connection Format
</reference/connection-string/#dns-seed-list-connection-format>`
documentation. This format offers flexibility in deployment and the
ability to change the servers in rotation without reconfiguring clients.
DNS SRV record. For more information, see the :ref:`connection-uri-srv`
section of this guide.

.. note::

Expand Down Expand Up @@ -94,6 +91,19 @@ In the example, you set two connection options: ``maxPoolSize=20`` and
``w=majority``. For more information about connection options, skip to the
:ref:`connection-options` section of this guide.

.. _connection-uri-srv:

DNS Service Discovery
~~~~~~~~~~~~~~~~~~~~~

.. sharedinclude:: dbx/srv-polling.rst

.. replacement:: srv-uri

.. code-block:: java

String uri = "mongodb+srv://<hostname>/";

.. _connect-atlas-java-driver:

Atlas Connection Example
Expand Down
Loading