-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 2.12.0
-
Component/s: Cluster Management
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
If the driver is unable to connect to a server that it's supposed to be monitoring, the current behavior is to retry with a frequency governed by MongoClientOptions.heartbeatConnectRetryFrequency. But it's not always necessary to do this. For example, it's normal for a server to go down for maintenance, and there is no reason to retry connecting to it so long as there are other servers available that are reachable.
Instead, the driver should always retry connecting at the normal frequency, governed by MongoClientOptions.heartbeatFrequency, even if the server is unreachable. The driver should then increase the frequency only when it is asked to execute an operation and is unable to find an appropriate server to use.