ApsaraDB for MongoDB

A secure, reliable, and elastically scalable cloud database service for automatic monitoring, backup, and recovery by time point

Buy Now Contact Sales


Alibaba Cloud ApsaraDB for MongoDB is a secure, reliable, and elastically scalable cloud database service. It currently supports the ReplicaSet and Sharding architectures and can be quickly deployed in just a few steps.

ApsaraDB for MongoDB’s highly available service includes automatic monitoring, backup, and disaster tolerance capabilities. This frees you from time-consuming database management tasks and lets you can focus on your applications and core business.


Reliable Storage

● Built based on Alibaba Cloud Apsara distributed file system and SSD high-performance storage.

● Three-node ReplicaSet architecture, ensuring redundant data storage.

● Periodic automatic backup, ensuring reliable data storage.

Elastic Scaling

● Supports both the ReplicaSet and Sharding architectures.

● Nodes of the ReplicaSet and Sharding can be upgraded or downgraded as required to scale resources.

● The number of mongoses and shards in Sharding instances can be scaled out at any time.

Professional Services

● Senior Alibaba Cloud technical team members available to provide professional services to boost security and resource elasticity.

● Optimized kernel for performance, security, and other dimensions managed by the source code team.


● Cost-effective with no upfront cost or long-term commitment.

● Offers flexible payment options including Monthly Subscription and Pay-As-You-Go.

Product Details

Alibaba Cloud ApsaraDB for MongoDB provides full O&M (operations and management) solutions for automatic deployment, creation, monitoring, backup, and recovery.

The database product supports the ReplicaSet and Sharding architectures and can be elastically upgraded or degraded based on resource consumption.



Abundant Database Architecture

  • ReplicaSet Architecture: Both primary and secondary nodes provide service. If the primary node is faulty, the system automatically selects a new primary node from the three nodes. If the secondary node is unavailable, the hidden node takes over service, ensuring system service availability.

  • Sharding Architecture: The fractional service (shard) and configuration service (configserver) adopt the stable and reliable three-node ReplicaSet architecture. They support flexible configuration of the number of the proxy service (mongos) and fractional service (mongos), linear expansion of storage of the linear database, as well as read/write performance.


Comprehensive Data Security

  • Backup Mechanism and Recovery: Automatically backs up data each day, providing strong disaster tolerance. Data at any time point within seven days can be recovered for free, preventing data loss and minimizing the cost of improper operations.

  • VPC: Instances can be deployed on a VPC built on the physical network using OverLay technology, and network isolation performed at the TCP layer.

  • Anti-DDoS: Provides real-time monitoring at the network entry point. When high-traffic attacks are identified, their source IP addresses will be cleaned. In the case that cleaning is ineffective, malicious IP addresses are directly pulled into the black hole.

  • IP Whitelist Configuration: Supports a maximum of 1,000 whitelist rules and performs risk control from the access source.


Visualized O&M Platform

  • Monitoring Platform: Monitors instance information, such as CPU utilization, IOPS, connections, and disk space in real time, so that you can keep track of the status of instances anytime, anywhere.

  • Visualized Management Platform: Simplifies high-frequency and high-risk operations, such as instance restart, backup, and data recovery, into a one-click operation.

  • Database Kernel Version Management: Proactively performs upgrade and quickly repairs defects, freeing you from daily version management; as well as optimizes MongoDB parameter configuration and maximizes utilization of system resources.


ApsaraDB for MongoDB provides two purchasing methods: Pay-As-You-Go and Subscription. The following prices are indicative. Exact prices can be found on the product purchase order page.

Pay-As-You-Go: Bills you for the exact resources you consume. With the Pay-As-You-Go payment method you can activate and release resources as needed with no hardware or maintenance costs.

Subscription: Average subscription fees are lower than that of Pay-As-You-Go and best suited for those that require long-term resources.

Pricing for ApsaraDB for MongoDB varies depending on the region of the instance you choose to deploy. Instances are charged per Instance Fee and Storage Fee.

Replica Set

ApsaraDB for MongoDB (Replica Set) offers both Pay-As-You-Go and Subscription payment methods.

Hong Kong, Asia Pacific SE 1 (Singapore)

  • Instance Price

Instance SpecificationCPU (Core)Memory (GB)Monthly Subscription (USD/Month)Pay-As-You-Go (USD/Hour)
  • Storage Price

Monthly Subscription (USD/Month)Pay-As-You-Go (USD/Hour)

US West 1 (Silicon Valley)

  • Instance Price

Instance SpecificationCPU (Core)Memory (GB)Monthly Subscription (USD/month)Pay-As-You-Go (USD/Hour)
  • Storage Price

Monthly Subscription (USD/Month)Pay-As-You-Go (USD/Hour)

China East 1, China East 2, China North 1, China North 2, China South 1

  • Instance Price

Instance SpecificationCPU (Core)Memory (GB)Monthly Subscription (USD/Month)Pay-As-You-Go (USD/Hour)
  • Storage Price

Monthly Subscription (USD/Month)Pay-As-You-Go (USD/Hour)


ApsaraDB for MongoDB (Sharding) can only be used with the Pay-As-You-Go payment method.

Hong Kong, Asia Pacific SE 1 (Singapore)

  • Mongos Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/Hour)
  • Shard Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/Hour)
  • Configservers Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/Hour)
  • Storage Price

Pay-As-You-Go (USD/Hour)

US West 1 (Silicon Valley)

  • Mongos Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/Hour)
  • Shard Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/Hour)
  • Configservers Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/Hour)
  • Storage Price

Pay-As-You-Go (USD/Hour)

China East 1, China East 2, China North 1, China North 2, China South 1

  • Mongos Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/hour)
  • Shard Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/hour)
  • Configservers Instance Price

SpecificationCPU (Core)Memory (GB)Pay-As-You-Go (USD/hour)
  • Storage Price

Pay-As-You-Go (USD/Hour)


Below are common ApsaraDB for MongoDB usage scenarios.

1) Internet Application

● Internet applications that boast fast service growth, large data volume, and rapid increases in traffic which require the ability to scale data storage.

Architecture Diagram

2) Server-divided Application

For cases where the servers of a game are divided, the service needs to be able to roll up/out or consolidate servers as required. During server rolling, it is important that the database provides fast image capabilities. For server combinations, the database provides incremental backup and provide restores by time point.

Architecture Diagram

3) Big Data Application

For big data service scenarios, online data is written into the backend database in real time. Data is then computed and analyzed by a dedicated computing engine. The analysis results are written into the source database so that the service can rapidly access the results.

Architecture Diagram

Getting Started

Access ApsaraDB for MongoDB from the Alibaba Cloud Console

The Alibaba Cloud console provides a simple web-based user interface for you to access and configure resources on your ApsaraDB for MongoDB instances.

By the console, you can perform common O&M operations, such as creation, backup, monitoring, and recovery, on your ApsaraDB for MongoDB instances.

Please refer to this Quick Start Guide for details about how to manage and operate ApsaraDB for MongoDB instances through the Alibaba Cloud console.


The links below will take you to the Document Center, which offers information for developers on how to best integrate ApsaraDB MongoDB with their existing applications.


1. Which version of MongoDB does ApsaraDB for MongoDB use?

ApsaraDB for MongoDB uses MongoDB 3.2 and must be accessed using a MongoDB driver later than version 3.0. You can go to the MongoDB website to download drivers in different programming languages.

2. How to correctly connect the MongoDB ReplicaSet to achieve high availability?

The MongoDB ReplicaSet ensures high data reliability by storing multiple ReplicaSets and high service availability through automatic primary/secondary switching. However, if the ReplicaSet is incorrectly connected, the high service availability cannot be achieved.
To correctly connect the ReplicaSet, you need to be familiar with the Connection String URI of the MongoDB. All official drivers support connection to the MongoDB in the Connection String mode.
The following lists content included in a Connection String:
mongodb:// indicates a prefix, representing a Connection String.
username:password@ specifies the user name and password if authentication is enabled.
hostX:portX indicates the ip:port information of the member in the ReplicaSet. Multiple members are separated by commas (,).
/database indicates the database to which the user account belongs to during authentication.
?options indicates the extra connection options.
You can obtain the name of a ReplicaSet and its member addresses from the ApsaraDB for MongoDB console.
When a ReplicaSet of the MongoDB is connected using a correct Connection String, the client automatically checks the relationship between the primary and secondary databases. If the relationship changes, the write operation is automatically switched to the new primary database to ensure high service availability.

3. Which languages does ApsaraDB for MongoDB support?

ApsaraDB for MongoDB can be connected through any MongoDB-compatible clients.
Supported programming languages include C, C++, C#, Java, Node.js, Python, PHP, and Perl.
NOTE: ApsaraDB for MongoDB must be accessed using a MongoDB driver later than version 3.0; otherwise, authentication will fail.

4. How do I create an account on ApsaraDB for MongoDB?

The root account is created on ApsaraDB for MongoDB by default. The root account created for the admin database has the permissions of the built-in root account for the MongoDB. After you log on to the database using the root account, you can create more accounts as required. Refer to the official document when creating accounts.

5. What permissions does the specified root account have when an instance is created?

The root account created for the admin database has the permissions of the built-in root account for MongoDB. After you log on to the database using the root account, you can create more accounts as required. You can use "show users" of the mongo shell to view the current user information.

6. What can I do if a node of ApsaraDB for MongoDB is down?

ApsaraDB for MongoDB provides a three-node ReplicaSet for user access. If a node is physically down, ApsaraDB for MongoDB automatically checks and restarts the process to restore the cluster. The process is transparent to users.

7. How is a backup file generated and recovered?

Currently, ApsaraDB for MongoDB supports regular backup and temporary backup. You can trigger either of the two backup methods on the console. ApsaraDB for MongoDB uses mongodump in the background to back up your data logically. Data is backed up on hidden secondary nodes without impact on service access.
Backup files are displayed in [Console] > [Backup and Recovery] > [Backup List]. You can overwrite the original instance with the backup files, but be cautious with this operation.

8. How does ApsaraDB for MongoDB perform security control using the IP whitelist?

To ensure the security and stability of the database, you will need to add IP addresses or IP segments for database access to a whitelist. ApsaraDB MongoDB allows you to add up to 1,000 IP addresses via the following steps:
1. Log on to the ApsaraDB MongoDB console and find the target instance.
2. Click the instance ID or the Manage button to go to the instance details page.
3. Select Security Control in the navigation bar on the left.
Click Manually Modify to manually enter the IP addresses/IP segments. Or, click Loading Intranet IP Addresses of ECS for the system to automatically add activated intranet IP addresses of the ECS.
NOTE: Separate the IP addresses with a comma (,). You can add up to 1,000 unique IP addresses/IP segments. Supported IP address formats include, (IP), and (CIDR mode; classless inter-domain routing; /24 represents the length of the prefix in the IP address; the prefix length ranges from 1 to 32). and a blank field indicate that there is no IP access restriction. In this case, the database may have a high security risk. We recommend that you set the access permission only for the Internet IP address/IP segment of your web server.