Correct DNS lookup with cross-region peering connection
A cross-region peering connection, say from an Atlas cluster in us-east-1 to some application running in eu-west-1, should allow the application to connect to the Atlas cluster through the peering connection. However, the DNS names of the cluster, e.g. my-cluster-shard-00-00.abx.mongodb.net, resolve to the public IP address of the cluster's node when looked up in eu-west-1. As a result, the application doesn't route the connection through the peering connection but rather tries to route it through the public Internet.
The solution is to manually find the private IP of each mongo node, and add an entry in /etc/hosts for each. This isn't straight forward and takes some work.