Skip to content
Merged
Changes from 1 commit
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
22 changes: 19 additions & 3 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 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 if unset or has a value of ``false``

*Default:* ``false``

Expand Down Expand Up @@ -119,7 +127,15 @@ available options.

* - ``SetLoadBalanced()``
- Specifies whether the driver is connecting to MongoDB using a
load balancer.
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 if unset or has a value of ``false``

*Default:* ``false``

Expand Down