Hi, I have check the official document and source code of MongoDB Node JS driver. I observed that only default values of “reconnectTries=30” and "reconnectInterval=1000 "are given, but there is no minimum and maximum values for “reconnectTries” and “reconnectInterval” have provided.
Wanted to let you know that the docs in question are older docs. The newest docs for Mongo’s connection strings are here: https://www.mongodb.com/docs/manual/reference/connection-string/ Newer versions of the mongo drivers no longer need to configure their reconnect options. Instead, you specify per-command what your tolerance is to wait for a resolution. The initial connection is now captured under serverSelectionTimeoutMS for replica sets and connectTimeoutMS.
We are radically dialing back what we consider to be an incomplete story for retryability in the driver, focusing first on providing first-class support for the specified retryable writes, and soon to be specified retryable reads. With the new SDAM layer there no longer is a required concept of “connecting”, rather you just create a client and begin to run operations, specifying how long you are willing to wait for a timeout and expecting the driver to automatically retry operations within that window.