Skip to content

DOCSP-47012 Document load balancers #532

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 3 commits into from
Jul 11, 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
24 changes: 20 additions & 4 deletions source/connect/connection-options/cluster-settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,16 @@ available options.
*Default:* ``false``

* - ``loadBalanced``
- Specifies whether the driver is connecting to MongoDB using a
load balancer.
- Specifies whether the driver is connecting to MongoDB by using a load
balancer. If set to ``true``, the driver assumes that it is
connecting through a load balancer.

You can set this option to ``true`` only if you meet the following requirements:

- You specify only one host name
- You aren't connecting to a replica set
- The ``srvMaxHosts`` option is unset or has a value of ``0``
- The ``directConnection`` option is unset or has a value of ``false``

*Default:* ``false``

Expand Down Expand Up @@ -118,8 +126,16 @@ available options.
*Default:* ``false``

* - ``SetLoadBalanced()``
- Specifies whether the driver is connecting to MongoDB using a
load balancer.
- Specifies whether the driver is connecting to MongoDB by using a
load balancer. If set to ``true``, the driver assumes that it is
connecting through a load balancer.

You can set this option to ``true`` only if you meet the following requirements:

- You specify only one host name
- You aren't connecting to a replica set
- The ``srvMaxHosts`` option is unset or has a value of ``0``
- The ``directConnection`` option is unset or has a value of ``false``

*Default:* ``false``

Expand Down