Amazon DynamoDB is a fully managed NoSQL database service that delivers fast, predictable performance and seamless scalability. ApsaraDB for MongoDB sharded cluster instances are compatible with the DynamoDB protocol. This topic describes how to create a DynamoDB-compatible sharded cluster instance.
DynamoDB-compatible instances are no longer available for purchase. If you need to use a sharded cluster instance, we recommend that you select the MongoDB protocol. For more information, see [Notice] End of sale for DynamoDB-compatible sharded cluster instances.
Prerequisites
-
An Alibaba Cloud account is required. To create an account, see Sign up for an Alibaba Cloud account or .
-
To create a pay-as-you-go instance, ensure that your account has a balance of at least CNY 100.
Usage notes
-
Only ApsaraDB for MongoDB sharded cluster instances that run MongoDB 4.0 are compatible with the DynamoDB protocol.
-
If your application is deployed on an ECS instance, the ApsaraDB for MongoDB instance and the ECS instance must meet the following requirements for network connectivity. For information about how to view details about an ECS instance, see View instance information.
They are in the same region.
They use the same network type.
NoteTo reduce network latency, place the instances in the same availability zone.
A VPC is recommended for its higher security.
If you use a VPC, both instances must be in the same VPC.
If you want to use a VPC but your ECS instance is in the classic network, you can migrate the ECS instance to a VPC. For more information, see Migrate an ECS instance from the classic network to a VPC.
Procedure
-
Log on to the ApsaraDB for MongoDB console.
-
In the navigation pane on the left, click Sharded Cluster Instances.
-
On the Sharded Cluster Instances page, click Create Instance.
Set Product Type to Sharded Cluster (Subscription) or Sharded Cluster (Pay-as-you-go).
-
Configure the following parameters for the DynamoDB-compatible sharded cluster instance.
Parameter
Description
Region
Select the region for the instance.
Note-
An instance's region cannot be changed after creation. Make sure to select the correct region.
-
If your application is deployed on an ECS instance, select the same region to allow the application to connect to the ApsaraDB for MongoDB instance over the internal network.
Zone
Select the zone where you want to create the instance.
Note-
If your application is deployed on an ECS instance, we recommend that you select the same zone as the ECS instance to reduce network latency. If you select a different zone, you can migrate the instance to another zone. For more information, see Migrate an instance across zones.
-
You can select multiple zones to implement in-city disaster recovery for the instance. For more information, see Create a multi-zone sharded cluster instance.
Protocol Type
Select DynamoDB protocol.
NoteFor more information about the DynamoDB protocol, see Compatibility details of DynamoDB-compatible instances.
Database Version
Select MongoDB 4.0.
Storage Engine
This parameter is fixed to WiredTiger.
Resource group
Select a resource group to manage the instance. You can add the instance to an existing resource group or create a resource group and add the instance to the new resource group. For more information about how to create a resource group, see Create a resource group.
NoteResource groups allow you to centrally manage multiple cloud resources that are deployed in different regions under a single Alibaba Cloud account.
Network type
Select VPC.
Note-
VPC: An isolated network environment that provides higher security and better performance than the classic network.
-
If your application is deployed on an ECS instance, make sure that the network type of the ECS instance is VPC to ensure network connectivity.
VPC
Select a VPC for the instance. If you do not have an available VPC, you can create one in the VPC console. For more information, see Create and manage a VPC.
Note-
To change the network type, see Change the network type of an instance.
-
You can also use an Express Connect circuit or a VPN gateway to connect your on-premises data center to Alibaba Cloud resources in a VPC. This way, you can build a virtual data center and smoothly migrate your applications to the cloud. For more information, see Hybrid access solution for smooth migration from the classic network to a VPC.
vSwitch
Select a vSwitch for the instance. If you do not have an available vSwitch, you can create one in the VPC console. For more information, see Create and manage a vSwitch.
mongos规格
Select the specifications for the Mongos nodes. For more information about supported Mongos specifications, see Instance specifications.
NoteYou can change the specifications and number of Mongos nodes while the instance is running.
Mongos quantity
Select the number of Mongos nodes. Valid values: 2 to 32.
Note-
By default, each Mongos node is a standalone node. We recommend that you select at least two Mongos nodes to ensure high availability.
-
By default, a single sharded cluster instance supports a maximum of 32 Mongos nodes.
Shard Specification
Select the specifications for the Shard nodes. For more information about supported Shard specifications, see Instance specifications.
NoteYou can change the specifications and number of Shard nodes while the instance is running.
Shard Storage
Select a storage capacity for the instance.
Note-
This is the storage capacity of an individual node, not the total storage capacity of all nodes.
-
The storage space of a Shard node is used to store data files, system files, and log files.
Read-only Nodes
If you purchase a subscription sharded cluster instance, you can select the number of read-only nodes for the instance. For more information about read-only nodes, see Read-only nodes.
Shard quantity
Select the number of Shard nodes. Valid values: 2 to 32.
Note-
By default, each Shard node is a three-node replica set. We recommend that you select at least two Shard nodes. This allows you to configure data sharding based on your business requirements to make full use of the storage and computing capabilities of the Shard nodes. For more information, see Configure sharding to make full use of Shard performance.
-
By default, a single sharded cluster instance supports a maximum of 32 Shard nodes.
Configserver Specifications
This parameter is fixed to 1 vCore and 2 GB of memory.
ConfigServer Storage
This parameter is fixed to 20 GB.
Set Password
Set a password for the root account. You can select one of the following methods:
-
Set Now: Set the password now.
-
Set Later: Set the password after the instance is created. For more information, see Reset a password.
Password
If you choose to set a password immediately, your password must meet the following requirements:
-
The password must contain characters from at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Valid special characters are:
!@#$%^&*()_+-=
-
The password must be 8 to 32 characters long.
Purchase Duration
If you create a subscription instance, select a subscription duration. You can select a duration of 1 to 9 months or 1 to 5 years.
NoteIf you want to enable auto-renewal for the instance, select Auto-Renewal and make sure that your account has a sufficient balance before the instance expires.
-
-
Purchase the instance based on its billing method.
Billing method
Procedure
Subscription
-
After you configure the parameters, click Create Now.
-
On the Confirm Order page, review the instance configurations and read the terms of service.
-
Click Payment and complete the payment on the Pay page.
NoteYou can also click Add to Cart to pay for the instance together with other products. For more information, see Pay for orders in the cart.
Pay-as-you-go
-
After you configure the parameters, click Create Now.
-
On the Confirm Order page, review the instance configurations and read the terms of service.
-
Click Activate Now. The system automatically deducts the fees in the next hour.
-
-
Verify that the sharded cluster instance is created.
-
After you complete the payment, click Console to go to the ApsaraDB for MongoDB console.
-
In the upper-left corner of the page, select the resource group and region of the instance.
-
In the navigation pane on the left, select Sharded Cluster Instances.
-
Check whether the created instance is displayed in the sharded cluster instance list.
-
If the instance is listed, it is being created. The instance is created successfully when its status changes to Running.
-
If it is not, wait 10 to 15 minutes and refresh the page. If the instance is still not displayed in the list, troubleshoot the issue based on the possible causes below. If the issue persists, contact Alibaba Cloud technical support.
The following table describes possible causes and their solutions.
Possible cause
Solution
Incorrect region selected
In the upper-left corner of the ApsaraDB for MongoDB console, select the resource group and region of the instance.
Incorrect instance list selected
In the navigation pane on the left of the ApsaraDB for MongoDB console, select Sharded Cluster Instances.
Insufficient resources
Your payment may be refunded if resources are insufficient in the selected zone.
After you confirm the refund, select another zone and try purchasing the instance again.
-
-
Shopping cart checkout
If you purchase a subscription instance, you can also click Add to Cart after you configure the parameters and pay for the instance together with other products. Use the following steps:
-
Click the Shopping Cart icon on the right side of the page.
-
In the Shopping Cart panel, select the products that you want to purchase and click Proceed to Checkout.
-
On the Shopping Cart page, confirm that the selected products are correct.
NoteYou can also reselect the Purchase Duration and Quantity for the ApsaraDB for MongoDB instance.
-
If all selections are correct, click Buy Now.
-
If a selection is incorrect, update it and then click Buy Now.
-
-
On the Confirm Order page, read the terms of service and click Buy.
-
On the Pay page, follow the prompts to complete the payment.
Related API operations
|
Operation |
Description |
|
|
|
Queries whether auto-renewal is enabled for an ApsaraDB for MongoDB instance. |
|
|
Queries the detailed information of an ApsaraDB for MongoDB instance. |
What's next
After the instance is created:
(Optional) If you skipped setting a password during creation, set it now. See (Optional) Reset a password.
Configure an IP whitelist to allow access to the instance. See Configure a whitelist for an instance.
(Optional) To connect over the Internet, apply for a public endpoint. See Apply for a public endpoint for an ApsaraDB for MongoDB standalone instance.