I have this situation :
One of my connection member is down (the server is down not only the mongo process)
My php over apache uses this connection pattern to connect :
I set the connectTimeoutMS to 1000
(I think that letting the default behavior to 60000 ms is a very bad idea, because when you have a member down, all apache workers get stuck ...)
But if one of my members goes down, everytime I create a new MongoClient it takes one seconde to determine that the host is down.
That means that when one of my servers goes down, all my web services are slowed down.
Why the driver does not remember that a server is down and blacklist it for a while? Why does it have to retry to connect to it and lock the process everytime we allocate a new MongoClient ?
I haven't find a workaround to fix this. Do you have an idea how to deal with it ?
Thanks for your help,