-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.1.8
-
Component/s: None
-
None
Hello,
Previous 'legacy' PHP driver used to connect() to mongo servers using blocking sockets since https://github.com/mongodb/mongo-php-driver/pull/166
https://jira.mongodb.org/browse/PHPC-512
.
When a mongo server process is down the OS' TCP stack can reject any request to connect() with an error, it's a near immediate answer. But when the server hosting mongo process is down (turned off/crashed), connectTimeoutMS (timeout option in driver) is fired. On a replicaset using 4 nodes with two nodes per datacenter (and 1 arbiter on a third Datacenter) it means a datacenter crash or network outage between the two main datacenters can generate 2*connectTimeoutMS delay, even if remaining servers are enough to satisfy queries (One PRIMARY and One SECONDARY, if using w<=2).
As socket connect() client side is blocking, the total time to connect to a cluster can be large.
So I would like to upgrade my application from legacy driver to latest one which moved its internals to mongo c driver to connect to cluster but does new driver present the same behaviour (large delay to connect on crash servers) or does it fix it ?
Please could you confirm ?
Thanks.
Regards.
- depends on
-
PHPC-605 Rely on libmongoc's socket handling and SSL implementation
- Closed
- is related to
-
CDRIVER-2052 Correct connectTImeoutMS
- Closed