Get Location of DB instances the response from Node.JS

I have setup database cluster on MongoDB Atlas which consists of db instance from from EU, US, and Asia. When connecting MongoDB Atlas using node.js, how to get the information of locations of db instance that response to my request?

Hi Jack, Do you mean that you have a multi-region cluster with replicas in each region, or is it an Atlas “global cluster” with shard zones in each cluster? Either way, your driver will by default connect to the nearest node: what would you use the location detail of the replica or zone for?

Hi Andrew, I want to make sure my cross geo setup works properly, and the mongodb indeed connects to the nearest nodes with the setup - is there a way to get the location details?