All Products
Search
Document Center

ApsaraDB for MongoDB:Create an instance

Last Updated:Mar 31, 2026

ApsaraDB for MongoDB supports three instance architectures. Choose the architecture that fits your workload, then follow the steps in the corresponding section to create an instance.

Choose an architecture

ArchitectureBest forKey constraints
Replica set (recommended)Most production workloadsHigh availability with automatic failover. Supports read-only nodes for read scaling.
Sharded clusterLarge datasets or high-throughput workloads that exceed a single node's capacityDistributes data across multiple shards. Requires configuring mongos, shards, and ConfigServer components.
StandaloneDevelopment, testing, or lightweight non-critical workloadsSingle node, no failover. Limited to MongoDB 4.0 and ESSD PL1 storage. Not suitable for production.

Prerequisites

Before you begin, ensure that you have:

Billing

Charges are based on instance specifications and storage. For details, see Billable items.

Free trial: Enterprise users creating their first ApsaraDB for MongoDB instance can apply for a free trial for replica set instances on the All Free Tier Products Available page.

Create a replica set instance

The following steps show how to create a pay-as-you-go MongoDB 8.0 replica set instance. For the full parameter reference, see Create a replica set instance.

  1. Go to the ApsaraDB for MongoDB buy page.

  2. Configure the following parameters. The following parameters are fixed and cannot be changed:

    Important

    The example password is for demonstration only. Do not use it in production.

    Required parameters

    ParameterDescriptionExample
    Product typeSelect the instance architecture.Replica Set (pay-as-you-go)
    RegionSelect the region where the instance is deployed. Choose the region closest to your application to reduce latency.China (Hangzhou)
    Deployment type/Zone typeSelect the deployment type.Single-zone
    ZoneSelect the zone within the region.Hangzhou Zone J
    Engine versionSelect a MongoDB version.MongoDB 8.0
    Active-standby nodesSelect the number of nodes in the replica set.Three Nodes Replicaset
    Storage typeSelect the storage type.ESSD PL1
    CategorySelect the specification category.Dedicated
    SpecificationsSelect the instance specifications, which determine CPU and memory.2 Cores, 8 GB (Dedicated)
    StorageSelect the storage capacity.20 GB
    Set passwordSelect Set Now to configure the password immediately. If you select Set Later, reset the password before connecting to the instance.Set Now
    PasswordEnter and confirm the password for the root account.PassWord123!

    Optional parameters

    ParameterDescriptionDefault
    Read-only nodesNumber of read-only nodes for read scaling.No Read-only Node
    Encryption typeWhether to enable disk encryption.No Encryption
    VPCVirtual private cloud (VPC) for the instance. For private network access, select the same VPC as your ECS instance. Use the Default VPC, or select an existing one in the VPC console.Default VPC
    vSwitchvSwitch for the instance. Use the Default Switch, or select an existing one in the VPC console.Default vSwitch
    Resource groupResource group for organizing the instance.Default Resource Group
    TagTags to attach to the instance.None
    Instance nameCustom name for the instance.Test instance
    QuantityNumber of instances to create with this configuration.1
    ParameterFixed value
    Storage engineWired Tiger
    Network typeVPC
    Usernameroot
  3. Click Buy Now.

  4. Confirm the Parameters and click Activate Now.

  5. On the Activated page, click Console to go to the Instances page. The new instance appears in the list.

Instance creation takes 10–15 minutes. If the instance is not listed, refresh the page.

Create a sharded cluster instance

The following steps show how to create a pay-as-you-go MongoDB 8.0 sharded cluster instance. For the full parameter reference, see Create a sharded cluster instance.

  1. Go to the ApsaraDB for MongoDB buy page.

  2. Configure the following parameters. The following parameters are fixed and cannot be changed:

    Important

    The example password is for demonstration only. Do not use it in production.

    Required parameters

    ParameterDescriptionExample
    Product typeSelect the instance architecture.Sharded Cluster (pay-as-you-go)
    RegionSelect the region where the instance is deployed.China (Hangzhou)
    Zone typeSelect the deployment type.Single-zone
    ZoneSelect the zone within the region.Hangzhou Zone J
    Engine versionSelect a MongoDB version.MongoDB 8.0
    Storage typeSelect the storage type.ESSD PL1
    CategorySelect the specification category.Dedicated
    Mongos specificationSelect the specifications for the mongos routing components.2 Cores, 8 GB (Dedicated)
    Mongos quantitySelect the number of mongos components.2
    Shard specificationsSelect the specifications for the shard components.2 Cores, 8 GB (Dedicated)
    Shard storageSelect the storage capacity of each shard.20 GB
    Shard quantitySelect the number of shard components.2
    ConfigServer specificationSelect the specifications for the ConfigServer components.4 Cores, 8 GB (Dedicated)
    ConfigServer storageSelect the storage capacity of the ConfigServer component.20 GB
    Set passwordSelect Set Now to configure the password immediately. If you select Set Later, reset the password before connecting to the instance.Set Now
    PasswordEnter and confirm the password for the root account.PassWord123!

    Optional parameters

    ParameterDescriptionDefault
    Shard read-only nodesNumber of read-only nodes per shard.No Read-only Node
    Encryption typeWhether to enable disk encryption.No Encryption
    VPCVPC for the instance. For private network access, select the same VPC as your ECS instance. Use the Default VPC, or select an existing one in the VPC console.Default VPC
    vSwitchvSwitch for the instance. Use the Default Switch, or select an existing one in the VPC console.Default vSwitch
    Resource groupResource group for organizing the instance.Default Resource Group
    TagTags to attach to the instance.None
    Instance nameCustom name for the instance.Test instance
    ParameterFixed value
    Protocol typeMongoDB
    Storage engineWired Tiger
    Network typeVPC
    Usernameroot
  3. Click Buy Now.

  4. Confirm the Parameters and click Activate Now.

  5. On the Activated page, click Console to go to the Instances page. The new instance appears in the list.

Instance creation takes 10–15 minutes. If the instance is not listed, refresh the page.

Create a standalone instance

Standalone instances are limited to MongoDB 4.0 and ESSD PL1 storage. For production workloads, use a replica set instance instead.

The following steps show how to create a pay-as-you-go MongoDB 4.0 standalone instance. For the full parameter reference, see Create a standalone instance.

  1. Go to the ApsaraDB for MongoDB buy page.

  2. Configure the following parameters. The following parameters are fixed and cannot be changed:

    Important

    The example password is for demonstration only. Do not use it in production.

    Required parameters

    ParameterDescriptionExample
    Product typeSelect Replica Set (pay-as-you-go). You configure a standalone node in the next field.Replica Set (pay-as-you-go)
    RegionSelect the region where the instance is deployed.China (Hangzhou)
    Deployment type/Zone typeSelect the deployment type.Single-zone
    ZoneSelect the zone within the region.Hangzhou Zone G
    Active-standby nodesSelect Standalone.Standalone
    SpecificationsSelect the instance specifications, which determine CPU and memory.4 Cores, 8 GB (General)
    StorageSelect the storage capacity.20 GB
    Set passwordSelect Set Now to configure the password immediately. If you select Set Later, reset the password before connecting to the instance.Set Now
    PasswordEnter and confirm the password for the root account.PassWord123!

    Optional parameters

    ParameterDescriptionDefault
    VPCVPC for the instance. For private network access, select the same VPC as your ECS instance. Use the Default VPC, or select an existing one in the VPC console.Default VPC
    vSwitchvSwitch for the instance. Use the Default Switch, or select an existing one in the VPC console.Default vSwitch
    Resource groupResource group for organizing the instance.Default Resource Group
    TagTags to attach to the instance.None
    Instance nameCustom name for the instance.Test instance
    QuantityNumber of instances to create with this configuration.1
    ParameterFixed value
    Engine versionMongoDB 4.0
    Read-only nodesNo Read-only Node
    Storage engineWired Tiger
    Storage typeESSD PL1
    CategoryGeneral-purpose
    Network typeVPC
    Usernameroot
  3. Click Buy Now.

  4. Confirm the Parameters and click Activate Now.

  5. On the Activated page, click Console to go to the Instances page. The new instance appears in the list.

Instance creation takes 10–15 minutes. If the instance is not listed, refresh the page.

What's next

Configure a whitelist