This topic describes how to apply for a public endpoint for an ApsaraDB for MongoDB instance. This way, you can connect to the instance over the Internet.
Apply for a public endpoint for a standalone instance
Apply for a public endpoint for a replica set instance
Apply for a public endpoint for a sharded cluster instance
References
Connect to an ApsaraDB for MongoDB instance over the Internet