File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
source/connect/connection-options Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,16 @@ available options.
6969 *Default:* ``false``
7070
7171 * - ``loadBalanced``
72- - Specifies whether the driver is connecting to MongoDB using a
73- load balancer.
72+ - Specifies whether the driver is connecting to MongoDB by using a load
73+ balancer. If set to ``true``, the driver assumes that it is
74+ connecting through a load balancer.
75+
76+ You can set this option to ``true`` only if you meet the following requirements:
77+
78+ - You specify only one host name
79+ - You aren't connecting to a replica set
80+ - The ``srvMaxHosts`` option is unset or has a value of ``0``
81+ - The ``directConnection`` option is unset or has a value of ``false``
7482
7583 *Default:* ``false``
7684
@@ -118,8 +126,16 @@ available options.
118126 *Default:* ``false``
119127
120128 * - ``SetLoadBalanced()``
121- - Specifies whether the driver is connecting to MongoDB using a
122- load balancer.
129+ - Specifies whether the driver is connecting to MongoDB by using a
130+ load balancer. If set to ``true``, the driver assumes that it is
131+ connecting through a load balancer.
132+
133+ You can set this option to ``true`` only if you meet the following requirements:
134+
135+ - You specify only one host name
136+ - You aren't connecting to a replica set
137+ - The ``srvMaxHosts`` option is unset or has a value of ``0``
138+ - The ``directConnection`` option is unset or has a value of ``false``
123139
124140 *Default:* ``false``
125141
You can’t perform that action at this time.
0 commit comments