What is ApsaraDB for MongoDB?

更新时间:
复制 MD 格式

ApsaraDB for MongoDB is a fully managed document database service built on the Apsara Distributed File System and a high-reliability storage engine. It delivers multi-node high availability, elastic scaling, and backup and recovery. Fully compatible with the MongoDB protocol, it is ideal for storing and querying unstructured or semi-structured data in mobile, IoT, gaming, and social media applications.

Key concepts

Before you start, review these key concepts:

  • Cloud database: A database service hosted on a cloud computing platform that you can use over the internet without managing the underlying hardware or configuration. For more information, see What is a cloud database?.

  • NoSQL: A non-relational database system that uses flexible data models, such as key-value pairs and documents, to support rapid development and horizontal scaling. It handles large volumes of distributed data and delivers fast query performance, making it ideal for big data and real-time web applications. For more information, see What is NoSQL?.

  • MongoDB: An open-source document database that uses a dynamic schema to store JSON-like BSON documents. Its flexible data model and efficient indexing make it ideal for applications that require rapid iteration and diverse data formats. For more information, see What is MongoDB?.

Data structure

MongoDB is a document-oriented NoSQL database. Its data structure consists of fields and values, similar to a JSON object:

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

Storage structure

MongoDB organizes data differently from traditional relational databases, using three core units:

MongoDB term

Description

Relational database equivalent

Document

The basic unit of data in MongoDB. A document is composed of BSON key-value pairs.

Row

Collection

A group of documents.

Table

Database

A database can contain multiple collections. You can create multiple databases in MongoDB.

Database

Why choose ApsaraDB for MongoDB?

  • Flexible deployment architecture. Choose from various deployment options for diverse business scenarios, such as testing, training, read-heavy workloads, and high-concurrency applications.

  • Elastic scaling. Easily scale your database by changing instance specifications, storage capacity, or the number of nodes to adapt to business changes on the fly.

  • Multiple migration tools. Migrate and synchronize your data using the ApsaraDB for MongoDB console, native MongoDB tools, or dedicated Alibaba Cloud tools.

  • Comprehensive security measures. Protect your data with a full suite of security features, including RAM authorization, audit logs, network isolation, whitelists, password authentication, and transparent data encryption (TDE).

  • Wide range of use cases. Thanks to its flexible data model, rich query language, diverse index types, and distributed architecture, the service is widely adopted for mobile, IoT, gaming, and social media applications.

For more information about the service, see the related documentation.

Learning path

Use the ApsaraDB for MongoDB learning path to explore concepts, basic operations, and advanced features.

Free trials

ApsaraDB for MongoDB offers free trials. For more information, see Free trials.

Pricing

For details about billable items, see Billable Items and Pricing.

Management methods

You can manage ApsaraDB for MongoDB instances through multiple methods, including creating instances, configuring networks, and managing databases and accounts.

Management method

Use cases

Description

Console

Best for users who prefer a graphical user interface (GUI) for instance management.

Provides a convenient web-based GUI.

CLI

Best for users who prefer command-line instance management.

All operations available in the console can also be performed by using the CLI.

SDKs

Best for integrating database management into your applications. SDKs are available for Java, Python, Go, and other languages.

All operations available in the console can also be performed by using an SDK.

API

Best for programmatic integration or cross-platform automation of instance management.

All operations available in the console can also be performed by using APIs.

After you create an ApsaraDB for MongoDB instance, you can connect to it in the following ways:

Access method

Use cases

Description

DMS

Best for performing database development tasks through a web-based interface.

Connect to an ApsaraDB for MongoDB replica set instance by using DMS

Mongo Shell

Best for developers who want to manage the database with the official MongoDB command-line tool.

Connect to an ApsaraDB for MongoDB replica set instance by using the Mongo Shell

Clients

Use any MongoDB-compatible database client to connect.

Examples include Robo 3T and Studio 3T.

Next steps

  • Create an ApsaraDB for MongoDB instance. Use the Getting Started guide to create and use an ApsaraDB for MongoDB instance. For more information, see Getting Started. When you create an instance, consider the following deployment aspects:

    • Region and zone. The region and zone determine the physical location of your instance and cannot be changed after creation. Select a region and zone based on factors such as your users' geographical location, Alibaba Cloud product availability, application high availability, and private network latency. For more information, see Regions and zones.

      For example, if your application is deployed on an ECS instance, create your ApsaraDB for MongoDB instance in the same region and zone to reduce network latency.

    • Network planning. After you select a region, you can create a VPC with a custom private CIDR block. Deploy the instance in either the VPC you create or the default VPC. For more information, see Configure a VPC when you create an instance.

  • Migrate an on-premises MongoDB database to the cloud. ApsaraDB for MongoDB is fully compatible with the MongoDB protocol. Use DTS or native MongoDB tools to migrate your on-premises MongoDB database to the cloud. For detailed instructions, see Data migration and synchronization. For more information about DTS, see What is DTS?.

  • Manage your ApsaraDB for MongoDB instance. Manage your instance yourself or use DAS to monitor real-time performance, analyze slow logs, and manage storage space. For more information about DAS, refer to the DAS documentation.

For a list of supported versions and features of ApsaraDB for MongoDB, see Features.