All Products
Search
Document Center

What is ApsaraDB for MongoDB?

Last Updated: May 07, 2021

ApsaraDB for MongoDB is a MongoDB-compatible database service that is developed based on the distributed system and high-reliability storage engine of Apsara. ApsaraDB for MongoDB uses a multi-node architecture to ensure high availability, and supports elastic scaling, disaster recovery, backup and restoration, and performance optimization.

Data structure of MongoDB

MongoDB is a document-oriented NoSQL database. MongoDB stores data in JSON-like documents that consist of field-value pairs. Example:

{
    name:"John",
    sex:"male",
    age:30
}

}

Storage structure of MongoDB

The storage structure of MongoDB is different from that of conventional relational databases. Data in MongoDB is organized at the following levels:

  • Document: Documents are the basic unit of data in MongoDB. A document consists of BSON key-value pairs and is equivalent to a row in a relational database.

  • Collection: A collection contains multiple documents. It is equivalent to a table in a relational database.

  • Database: A database contains multiple collections. It is equivalent to a relational database. You can create multiple databases in an ApsaraDB for MongoDB instance.

Why ApsaraDB for MongoDB?

For more information about the benefits of ApsaraDB for MongoDB, see Comparison between ApsaraDB for MongoDB and self-managed databases and Scenarios.

Pricing

For more information, see Billing items and pricing.

Dedicated clusters

You can purchase ApsaraDB for MongoDB instances in ApsaraDB for MyBase dedicated clusters. For more information, see What is ApsaraDB for MyBase?

Deployment suggestions

Consider the following aspects when you create and use an ApsaraDB for MongoDB instance:

  • Regions and zones

    A region is an Alibaba Cloud data center. A zone is a physical area within a region that has its own independent power grid and network. The region and zone determine the physical location of an ApsaraDB for MongoDB instance. You cannot change the region of an ApsaraDB for MongoDB instance after the instance is created. For more information, see Regions and zones.

    You can select a region and zone based on your geographical location, availability of Alibaba Cloud services, application availability requirements, and whether internal network communication is required. For example, if your application is deployed on an Elastic Compute Service (ECS) instance and requires an ApsaraDB for MongoDB instance to serve as its database, you must select the same region and zone as the ECS instance when you create your ApsaraDB for MongoDB instance.

    Note

    An ECS instance and an ApsaraDB for MongoDB instance in the same zone can be connected by using an internal network with minimal network latency.

  • Network planning

    We recommend that you use Virtual Private Cloud (VPC) to connect to ApsaraDB for MongoDB instances. You can plan your own Classless Inter-Domain Routing (CIDR) blocks for VPCs. A VPC is an isolated network with higher security and performance than the classic network. You can use the default VPC or create your own VPC before you use ApsaraDB for MongoDB. For more information, see Configure a VPC for a new instance.

  • Security solutions

    ApsaraDB for MongoDB eliminates your data security concerns by providing comprehensive security protection. You can ensure database security by means of zone-disaster recovery, Resource Access Management (RAM) authorization, audit logs, network isolation, whitelists, password authentication, and Transparent Data Encryption (TDE). For more information, see Best practices for data security of ApsaraDB for MongoDB.

Methods to manage ApsaraDB for MongoDB instances

You can use the following methods to manage ApsaraDB for MongoDB instances, such as creating instances, databases, and accounts, and specifying network-related settings:

  • Console: The ApsaraDB for MongoDB console provides a graphical and easy-to-use web interface.

  • API: All operations that are available in the console can be performed.

After you create an ApsaraDB for MongoDB instance, you can connect to the instance by using one of the following methods:

  • Mongo shell: You can log on to the instance by using the official MongoDB CLI tool to manage databases. For more information, see Connect to a replica set instance by using the mongo shell.

  • Client: ApsaraDB for MongoDB is compatible with the MongoDB protocol. You can use common database client tools such as Robo 3T and Studio 3T to connect to ApsaraDB for MongoDB instances.

Related services

  • ECS: The best performance is achieved when you connect to ApsaraDB for MongoDB instances from ECS instances in the same region over an internal network. ECS and ApsaraDB for MongoDB instances compose a typical business architecture.

  • Data Transmission Service (DTS): You can use DTS to migrate data from an on-premises MongoDB database to the cloud.

  • Object Storage Service (OSS): OSS is a secure, cost-effective, and reliable cloud storage service that is provided by Alibaba Cloud. OSS allows you to store large volumes of data in the cloud.