@@ -96,7 +96,9 @@ the following connects to the replica set we just created::
96
96
The addresses passed to :meth: `~pymongo.mongo_client.MongoClient ` are called
97
97
the *seeds *. As long as at least one of the seeds is online, MongoClient
98
98
discovers all the members in the replica set, and determines which is the
99
- current primary and which are secondaries or arbiters.
99
+ current primary and which are secondaries or arbiters. Each seed must be the
100
+ address of a single mongod. Multihomed and round robin DNS addresses are
101
+ **not ** supported.
100
102
101
103
The :class: `~pymongo.mongo_client.MongoClient ` constructor is non-blocking:
102
104
the constructor returns immediately while the client connects to the replica
@@ -325,11 +327,12 @@ mongos Load Balancing
325
327
---------------------
326
328
327
329
An instance of :class: `~pymongo.mongo_client.MongoClient ` can be configured
328
- with a list of mongos servers:
330
+ with a list of addresses of mongos servers:
329
331
330
332
>>> client = MongoClient(' mongodb://host1,host2,host3' )
331
333
332
- Each member of the list must be a mongos server. The client continuously
334
+ Each member of the list must be a single mongos server. Multihomed and round
335
+ robin DNS addresses are **not ** supported. The client continuously
333
336
monitors all the mongoses' availability, and its network latency to each.
334
337
335
338
PyMongo distributes operations evenly among the set of mongoses within its
@@ -352,3 +355,7 @@ But it excuses host3: host3 is 20ms beyond the lowest-latency server.
352
355
If we set ``localThresholdMS `` to 30 ms all servers are within the threshold:
353
356
354
357
>>> client = MongoClient(' mongodb://host1,host2,host3/?localThresholdMS=30' )
358
+
359
+ .. warning :: Do **not** connect PyMongo to a pool of mongos instances through a
360
+ load balancer. A single socket connection must always be routed to the same
361
+ mongos instance for proper cursor support.
0 commit comments