This topic describes how to create a sharded cluster instance in the ApsaraDB for MongoDB console.

Prerequisites

  • An Alibaba Cloud account is created. For more information, see Sign up with Alibaba Cloud.
  • Your account balance is sufficient if you want to create a pay-as-you-go instance.

Billing information

For more information, see Billing items and pricing.

Procedure

After you perform the following operations, ApsaraDB for MongoDB automatically creates your instance. You do not need to manually install or deploy an instance.

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Sharded Cluster Instances.
  4. On the Sharded Cluster Instances page, click Create Instance.
  5. Click Sharded Cluster (Subscription) or Sharded Cluster (Pay-as-you-go).
    Note
    • Subscription: You must pay for an instance when you create the instance. This method is more cost-effective than the pay-as-you-go method. We recommend that you select this method for long-term use. A longer subscription period enables a larger discount.
    • Pay-as-you-go: You are billed on an hourly basis based on the used resources. We recommend that you select this billing method for short-term use. You can reduce costs by releasing your pay-as-you-go instance after you no longer need the instance.
  6. Configure the instance parameters. The following table describes the related parameters.
    Section Parameter Description
    Basic Configuration Region

    The region where the ApsaraDB for MongoDB instance is deployed. After an instance is created, you cannot change the region. Exercise caution when you select the region.

    Instances in the same region (such as an ECS instance and an ApsaraDB for MongoDB instance) can be connected with each other over an internal network.

    Zone

    A zone is a geographic area with an independent power supply and network. An ECS instance and an ApsaraDB for MongoDB instance in the same zone can be connected over an internal network with minimum network latency.

    Note To implement zone-disaster recovery, you can deploy the replica set instance across multiple zones. For more information, see Create a multi-zone sharded cluster instance.
    Database Version

    The MongoDB version of the sharded cluster instance. Valid values: 3.4, 4.0, and 4.2.

    For more information about versions, see MongoDB versions and storage engines.

    Note You can manually upgrade the database version when an instance is running. For more information, see Upgrade MongoDB versions.
    Storage Engine

    The storage engine of the instance, which is fixed as WiredTiger.

    Network Type Classic Cloud services in the classic network are not isolated. You can configure security groups or whitelist policies to block unauthorized access to the cloud services.
    VPC A virtual private cloud (VPC) is an isolated network with higher security and performance than the classic network. We recommend that you select the VPC network type.
    Note
    Mongos Specification Specification The specifications of each mongos node. For more information, see Instance types.
    Note You can add new mongos nodes or change the configurations of existing shard nodes while a sharded cluster instance is running.
    Quantity

    The number of mongos nodes.

    A sharded cluster instance can contain 2 to 32 mongos nodes.

    Shard Specifications Specification The specifications of each shard node. For more information, see Instance types.
    Note You can add new shard nodes or change the configurations of existing shard nodes while a sharded cluster instance is running.
    Storage Space The storage capacity of each shard node. Valid values: 10 GB to 1,000 GB.
    Note The storage capacity of a shard node stores your data, system, and log files.
    Quantity

    The number of shard nodes.

    A sharded cluster instance can contain 2 to 32 shard nodes.

    Configserver Specifications Specification

    The specifications of each Configserver node, which is fixed as 1 vCPU, 2 GiB memory, and 20 GB of storage capacity. The Configserver specifications are not user-configurable.

    Set Password Set Now
    • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include

      ! @ # $ % ^ & * ( ) _ + - =

    • The password must be 8 to 32 characters in length.
    Set Later Set a password for a sharded cluster instance after the instance is created.
    Validity N/A You must specify this parameter when you create a sharded cluster instance that uses the subscription billing method. You can select one to nine months for the subscription period on a monthly basis, or one to five years for the subscription period on a yearly basis.
  7. After you configure the preceding parameters, click Buy Now.
  8. On the Confirm Order page, read and select ApsaraDB for MongoDB Agreement of Service, and complete the payment.

View the created instance

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Sharded Cluster Instances.

Troubleshoot if you cannot find the instance

Possible cause Solution
You selected a wrong region in the console. Select the region where the instance is deployed. For more information, see View the created instance.
You opened an incorrect page. In the left-side navigation pane, click Sharded Cluster Instances. For more information, see View the created instance.
The instance list in the ApsaraDB for MongoDB console was not updated or was updated before the instance is created. Wait several minutes and then update the instance list to check whether the instance is added to the list.
Resources are insufficient.

The system may fail to create the instance due to insufficient resources. In this case, your payment is refunded. You can check the refund on the Orders page.

After you confirm the refunded fees, you can try to create your instance in another region or zone. You can also submit a ticket.

What to do next

After you create an instance, you must configure a whitelist. For more information, see Configure a whitelist for a sharded cluster instance. If you want to connect to the instance over the Internet, you must apply for a public endpoint. For more information, see Apply for a public endpoint for a sharded cluster instance.

For more information about instance connection methods and connection scenarios, see Connect to an ApsaraDB for MongoDB instance.