ApsaraDB for MongoDB is fully compatible with the MongoDB protocol. Based on the Apsara distributed system and high-reliability storage engine, it provides a multiple-node HA architecture and various solutions, such as elastic scaling, disaster recovery, rollback by using backup files, and performance optimization.

Why ApsaraDB for MongoDB?

For information about advantages of ApsaraDB for MongoDB, see Comparison between ApsaraDB for MongoDB and user-created databases and Scenarios.

Supported architecture

ApsaraDB for MongoDB supports flexible deployment architecture to meet the requirements of different business scenarios.

Instance architecture Description
Standalone instance A standalone instance is suitable for development, testing, and other scenarios where non-core enterprise data is stored. It enables you to purchase ApsaraDB for MongoDB at a lower entry-level price and enjoy its superior O&M support and kernel-level optimization. For more information, see Create a standalone ApsaraDB for MongoDB instance
Replica set instance

A replica set instance automatically created by ApsaraDB for MongoDB has a primary node (for you to use), a hidden node (invisible to you), and a certain number of secondary nodes. For more information, see Architecture of replica set instances.

In scenarios with more read operations and fewer write operations, such as reading websites and order query systems, or with business spikes, you can add or delete secondary nodes based on your business needs to improve the read performance. For more information, see Change the number of nodes for a replica set instance.

Sharded cluster instance A sharded cluster instance is created based on multiple three-node replica sets. A sharded cluster instance consists of three components: mongos, shard, and config server. You can specify the number and configuration of mongos and shard nodes as needed to create ApsaraDB for MongoDB clusters with different service capabilities. For more information, see Glossary.
Note
  • Mongos: a service agent configured with only one node. A single sharded cluster instance supports 2 to 32 mongos.
  • Shard: a shard server with a three-node replica set architecture. A single sharded cluster instance supports 2 to 32 shards.
  • Config server: a configuration server with a three-node replica set architecture. By default, it is configured with one CPU, 2 GB memory, and 20 GB storage capacity. You cannot change the specifications.

Pricing

For more information, see Billing items and pricing.

Deployment suggestions

You need to consider the following aspects when you create or use an ApsaraDB for MongoDB instance:

  • Regions and zones

    A region is an Alibaba Cloud data center. A zone is a physical area with independent power grids and networks in a region. The region and zone determine the physical location of an ApsaraDB for MongoDB instance. After an instance is created, the region cannot be changed. For more information, see Regions and zones.

    Select the region and zone based on the target 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 function as its database, you must select the same region and zone as the ECS instance when you create your ApsaraDB for MongoDB instance.
    Note Network latency is minimal when the ECS instance and the ApsaraDB for MongoDB instance in the same zone communicate with each other over an internal network.
  • Network planning

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

  • Security solutions

    ApsaraDB for MongoDB eliminates your data security concerns with comprehensive security protection. You can guarantee database data security by using zone-disaster recovery, 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.

How to use ApsaraDB for MongoDB

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: provides a visualized and easy-to-use web interface.
  • API: All operations available in the console can be performed by calling API operations.

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

  • Mongo shell: official MongoDB CLI tool. You can log on to the instance by using the mongo shell to manage databases. For more information, see Connect to a replica set instance by using the mongo shell.
  • Client: 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 access ApsaraDB for MongoDB instances.

Related services

  • ECS: The best performance is achieved when ECS accesses ApsaraDB for MongoDB instances in the same region over an internal network. ECS and ApsaraDB for MongoDB instances are typical business access architectures.
  • DTS: You can use Data Transmission Service (DTS) to migrate an on-premises MongoDB database to the cloud.
  • OSS: Object Storage Service (OSS) is a secure, low-cost, and highly reliable cloud storage service provided by Alibaba Cloud. It can store vast quantities of data.