Skip to content
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