-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
The 1.x driver requires replica set names to be unique (PHP-729) and also redundantly connects to non-canonical seed list hosts on subsequent requests (PHP-1211). There are also concerns with persistent, authenticated connections being shared by multiple MongoClient instances.
Ideally, persistent connections should be hashed by a unique set of MongoClient arguments, including the URI and relevant connection options (e.g. SSL, auth, timeouts, but not read preferences or default write concern). With this strategy, the driver might still connect and discard connections to non-canonical seed list hosts, but subsequent requests would immediately find the persistent connections to utilize based on the MongoClient argument hash. Additionally, there would be no concern of connections being shared between MongoClient instances, nor would there be any conflict with duplicate replica set names.