All Products
Search
Document Center

ApsaraDB for MongoDB:Compatibility and configuration changes

Last Updated:May 16, 2025

This topic describes the compatibility and configuration change issues of ApsaraDB for MongoDB.

What is the relationship between ApsaraDB for MongoDB and MongoDB?

ApsaraDB for MongoDB is a document database service compatible with the MongoDB protocol. It supports most MongoDB commands. Any client compatible with MongoDB can establish a connection with ApsaraDB for MongoDB for data storage and related operations.

To learn more about ApsaraDB for MongoDB and its advantages over self-managed databases, refer to the following topics:

Which database versions does ApsaraDB for MongoDB support?

ApsaraDB for MongoDB supports the following database versions: 8.0, 7.0, 6.0, 5.0, 4.4, 4.2, 4.0, and 3.4 (discontinued). We recommend that you use a client that corresponds to your database version. You can download clients for various programming languages from the official website.

Does ApsaraDB for MongoDB support nesting?

Yes. In the following example, the content in the fields field is a nested document.

{
        "_id" : ObjectId("5cf0e51d8d1acb8a892ca65e"),
        "id" : "16399864",
        "timestamp" : "1453185620",
        "tablename" : "houseinfo",
        "dbname" : "corp_officebuilding",
        "primaryKeys" : "Id",
        "class" : "class com.uban.dts.bean.DtsLog",
        "dbType" : "MYSQL",
        "fieldCount" : "138",
        "opt" : "UPDATE",
        "fields" : {
                "Status" : {
                        "dest" : "0",
                        "orgi" : "1420041600"
                }
        }
}

Which commands does ApsaraDB for MongoDB support and limit?

For more information about official MongoDB commands, see Database Commands.

For more information about commands that ApsaraDB for MongoDB supports and limits, see What commands are supported and not supported by ApsaraDB for MongoDB?

Does ApsaraDB for MongoDB support adding nodes?

Does ApsaraDB for MongoDB support Mongoose?

Yes. ApsaraDB for MongoDB is fully compatible with MongoDB Community Edition and supports Mongoose.

What are the impacts of changing storage capacity on an instance?

For more information about how to change storage capacity and its impacts, see Change the configuration of an instance.

Note

We recommend that you use an SRV connection string URI or a connection string URI to connect your application in a production environment to your instance. This prevents your application from being affected by primary/secondary switchovers. For more information, see Connect to a replica set instance and Connect to a sharded cluster instance.

Why do I need to upgrade my instance to the latest MongoDB version?

  • New features and optimizations in the latest versions: As the MongoDB community evolves, MongoDB provides more benefits such as enhanced performance, optimized security, and a wider range of features in the latest versions.

  • Risks in earlier versions: As the MongoDB community gradually stops support and maintenance for earlier MongoDB versions, you can face many challenges and may even encounter security and stability risks if continuing to use an earlier MongoDB version.