All Products
Search
Document Center

ApsaraDB for MongoDB:What is ApsaraDB for MongoDB?

Last Updated:Feb 11, 2025

ApsaraDB for MongoDB is a document database service that is developed based on the distributed Apsara system and high-reliability storage engine and designed to simplify database deployment and management. It uses a multi-node architecture to ensure high availability, and supports features such as elastic scaling and backup and restoration. It is fully compatible with the MongoDB protocol and processes unstructured or semi-structured data. It is widely used in common scenarios such as mobile application, IoT, gaming, and social networking.

Terms

Data structure

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

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

Storage structure

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

ApsaraDB for MongoDB term

Description

Corresponding relational database term

Document

Documents are the most basic unit in ApsaraDB for MongoDB. The unit consists of BSON key-value pairs.

Row

Collection

A collection contains multiple documents.

Table

Database

A database contains multiple collections. You can create multiple databases in an ApsaraDB for MongoDB instance.

Database

Why ApsaraDB for MongoDB?

  • Flexible deployment architectures. ApsaraDB for MongoDB provides flexible deployment architectures that meet multiple common business scenarios, such as testing, learning and training, greater reading and less writing, and high concurrent reading/writing.

  • Support for elastic scaling. ApsaraDB for MongoDB allows you to change instance configurations. You can change the instance specifications, storage capacity, and node quantity. This way, you can quickly respond to business changes.

  • Various data migration and synchronization tools. ApsaraDB for MongoDB allows you to migrate and synchronize data in the ApsaraDB for MongoDB console or by using native MongoDB tools. In addition, you can use tools that are developed by Alibaba Cloud.

  • Perfect security measures. ApsaraDB for MongoDB allows you to ensure database security by using Resource Access Management (RAM) authorization, audit logs, network isolation, whitelists, password authentication, and transparent data encryption (TDE).

  • Extensive common scenarios. ApsaraDB for MongoDB is widely used in fields such as mobile applications, IoT, gaming, and social networking due to characteristics such as flexible data models, various query languages and index types, and distributed architectures.

For more information, see Benefits and Common scenarios.

Free trials

Alibaba Cloud provides a free trial of ApsaraDB for MongoDB. For more information, see Free trials.

Pricing rules

For more information about the billable items of ApsaraDB for MongoDB, see Billable items.

Usage methods

Alibaba Cloud provides multiple usage methods to meet the requirements of different users for instance management, including instance creation, database creation, account creation, and network configuration.

Usage method

Scenarios

Description

Console

Suitable for beginners or users who need to quickly manage instances. The ApsaraDB for MongoDB console provides GUIs. This way, you can perform operations in an efficient manner.

The ApsaraDB for MongoDB console provides web-based GUIs. This way, you can perform operations in an efficient manner.

API

Suitable for scenarios that require extensive integration or cross-platform interaction. API calling is a more flexible and standardized management approach.

You can call APIs to perform the operations that are available in the ApsaraDB for MongoDB console.

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

Access mode

Scenarios

Description

Mongo Shell

Use the official command-line tool of ApsaraDB for MongoDB to manage databases, which is suitable for users that have development experience.

Connect to a replica set instance by using the mongo shell

Clients

ApsaraDB for MongoDB is fully 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.

What to do next

  • Create an ApsaraDB for MongoDB instance. You can create and use an ApsaraDB for MongoDB instance by referring to documents in Quick Access. For more information, see Getting started. We recommend that you deploy the instance from the following dimensions when you create the instance:

    • Region and zone. The region and zone of the instance determine the physical location of the instance and cannot be changed after the instance is created. We recommend that you select a region and zone based on factors such as your geographical location, Alibaba Cloud product availability, application availability, and internal network communication requirements. For more information, see Regions and zones.

      For example, if your application is deployed on an Elastic Compute Service (ECS) instance, we recommend that you select the same region and zone as the ECS instance for your ApsaraDB for MongoDB instance.

    • Network. After you determine the region where the instance resides, you can plan the private IP address segment of the instance and create a virtual private cloud (VPC) for the instance. Then, you can deploy the instance in the VPC or in the default VPC. For more information, see Configure a VPC for a new instance.

  • Migrate local MongoDB databases to ApsaraDB for MongoDB. ApsaraDB for MongoDB is fully compatible with the MongoDB protocol. You can use Data Transmission Service (DTS) or MongoDB tools to migrate data from your local MongoDB databases to ApsaraDB for MongoDB. For more information, see Data migration and synchronization. For more information about DTS, see What is DTS?

For more information about the versions and features of ApsaraDB for MongoDB, see Features.