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.
69
69
*Default:* ``false``
70
70
71
71
* - ``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``
74
82
75
83
*Default:* ``false``
76
84
@@ -118,8 +126,16 @@ available options.
118
126
*Default:* ``false``
119
127
120
128
* - ``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``
123
139
124
140
*Default:* ``false``
125
141
You can’t perform that action at this time.
0 commit comments