Replica set read preference nearest is still slow Replica set read preference nearest is still slow mongoose mongoose

Replica set read preference nearest is still slow


The information in your output states that the database server is processing the query quickly. So this issue will likely lie outside of the database itself, probably in the client.

Are you running the same query multiple times and timing each execution?

I suspect that this may be due to some initial discovery on your MongoDB client's part - how is it to know what is the nearest before responding if it doesn't initially hit every node and time the responses?