This topic describes how to create an ApsaraDB for MongoDB instance, configure the instance information, and connect to the instance.

Deployment architectures

ApsaraDB for MongoDB supports multiple flexible deployment architectures to meet the requirements of different business scenarios. The following section describes the architectures:
  • Architecture of standalone instances

    Standalone instances apply to development, testing, education, and scenarios where non-core enterprise data is stored. You can select the instance specifications that are most suitable for your business scenarios to minimize costs. For more information, see Architecture of standalone instances.

  • Architecture of replica set instances

    Replica set instances are suitable for burst traffic scenarios that require significantly more reads than writes or temporary activities. A replica set instance consists of a primary node that supports read and write operations, one, three, or five high-availability secondary nodes, a hidden node, and up to five optional read-only nodes. You can add or remove secondary nodes and read-only nodes based on your business needs. For more information, see Architecture of replica set instances.

  • Architecture of sharded cluster instances

    Sharded cluster instances are suitable for scenarios that require highly concurrent read and write operations. A sharded cluster instance is based on multiple three-node replica set instances. Each replica set instance contains three nodes in primary/secondary mode and up to five optional read-only nodes. A sharded cluster instance consists of three components: mongos, shard, and Configserver nodes. You can specify the number and specifications of mongos and shard nodes to create sharded cluster instances that have different service capabilities. For more information, see Architecture of sharded cluster instances.

Procedure

The following flowchart shows all the operations that you need to perform, from purchasing an instance to using it.Flowchart
  1. Create an instance. The methods that you can use to create instances vary based on instance categories. For more information, see the following topics:
  2. Optional:If you have not set a password or have forgotten your password, set or reset a password. For more information, see Reset the password of an account of an ApsaraDB for MongoDB instance.
  3. Configure a whitelist. To allow specific external devices to access your instance, you must add the IP addresses of these devices to the whitelist of your instance. For more information, see Configure a whitelist for an ApsaraDB for MongoDB instance.
  4. Optional:If you want to connect to your instance by using a public endpoint, first apply for a public endpoint for the instance. For more information, see Apply for a public endpoint for an ApsaraDB for MongoDB instance.
  5. Connect to the instance. The methods that you can use to connect to instances vary based on instance categories. For more information, see the topics listed in the following table.
    Instance category References
    Standalone instance
    Replica set instance
    Sharded cluster instance