Step 1: Buy a Replica Set Instance
Scenarios
This section describes how to create a replica set instance on the DDS management console. Currently, DDS replica set instance supports the yearly/monthly and pay-per-use billing modes. DDS allows you to tailor your compute resources and storage space to your business needs.
You can use your account to create up to 50 replica set instances.
Prerequisites
- You have registered a HUAWEI CLOUD account.
- Your account balance is greater than or equal to ¥0.
- If you want to use compute and network resources exclusively, you need to Enabling a DeC and Applying for DCC Resources. Then, you can create DDS DB instances. Click
in the upper left corner and select a region and a project.
You will be charged for purchasing DDS DB instances through DeC.
Currently, only pay-per-use replica set instances can be purchased through DeC.
Procedure
- Log in to the DDS console.
- On the Instance Management page, click Buy DB Instance.
- On the displayed page, select a billing mode, select your DB instance specifications and click Next.
Figure 1 Billing mode and basic information
Table 1 Billing mode Parameter
Description
Billing Mode
Select a billing mode, Yearly/Monthly or Pay-per-use.
- Yearly/Monthly
- You need to set Validity Period as required. Then, the system deducts the fees incurred at one time from your account based on the service price.
- When you renew a yearly/monthly DB instance, you can change its billing mode from yearly/monthly to pay-per-use based on your service requirements. For details, see Changing Yearly/Monthly Instances to a Pay-per-Use.
NOTE:
DB instances paid in yearly/monthly mode cannot be deleted. They support only resource unsubscription. For details, see section Unsubscribing from a Yearly/Monthly DB Instance.
- Pay-per-use
- You do not need to set Validity Period because the system deducts the fees incurred from your account based on the service duration.
- If you want to use a DB instance at a low cost for a long period of time, you can change its billing mode from pay-per-use to yearly/monthly. For details, see Changing the Billing Mode in Batches.
Table 2 Basic information Parameter
Description
Region
A region where the tenant is located. It can be changed in the upper left corner.
NOTE:DB instances deployed in different regions cannot communicate with each other through a private network, and you cannot change the region of a DB instance once it is purchased. Exercise caution when selecting a region.
DB Instance Name
The DB instance name can be 4 to 64 characters long. It must start with a letter and can contain only uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_).
If you buy multiple DB instances, you can only enter 4 to 49 characters to set the DB instance name, and then the system automatically appends a date, time, and serial number to the end of the instance names (format: instance_name-MMDD-HHmmss-SN).
After the DB instance is created, you can change its name. For details, see Modifying the DB Instance Name.
Database Type
Community Edition
DB Instance Type
Select Replica set.
A replica set consists of the primary node, secondary node, and hidden node. If a primary node goes down or becomes faulty, a secondary node is automatically assigned to the primary role and continues normal operation. If a secondary node is unavailable, a hidden node will take the role of the secondary to ensure high availability.
Compatible MongoDB Version
- 4.0
- 3.4
- 3.2
CPU Type
Currently, DDS supports two CPU architectures: x86 and Kunpeng. The two architectures have similar capabilities and performance, both of which can meet your service requirements.
For details about the instance types, versions, and specifications supported by the two CPU architectures, see DB Instance Specifications.
Resource Type
If you use DeC, this parameter is displayed.
EVS and DSS disks are provided based on whether storage resources are exclusively used. DSS disks provide dedicated storage resources.
- If you have applied for a storage pool on the DSS page, click the DSS tab and create disks in the obtained storage pool.
- If you have not applied for an exclusive storage pool, click the EVS disk tab. Then, the created disks use public storage resources.
Storage Type
If you do not use DeC, the storage type is ultra-high I/O by default.
For DeC users, the supported storage types vary depending on the selected resource type.
- If you select EVS for Resource Type, Storage Type is set to Ultra-high I/O.
- If you select DSS for Resource Type, Storage Type can be set to Common I/O, High I/O, or Ultra-high I/O.
Storage Pool
This option is displayed only when you select DSS for Resource Type. The storage pool is physically isolated from other pools and is secure.
Storage Engine
WiredTiger
AZ
An AZ is a part of a region with its own independent power supplies and networks. AZs are physically isolated but can communicate through an internal network connection.
Currently, instances can be deployed in a single AZ or three AZs.
- If you want to deploy an instance in a single AZ, select one AZ.
- If you want to deploy an instance across AZs for disaster recovery, select three AZs. In this deployment mode, the nodes are evenly distributed in the three AZs.
Disk Encryption
- Disabled: Disable the encryption function.
- Enabled: Enable the encryption function. This feature improves data security but slightly affects read/write performance.
Key Name: Select or create a private key, which is the tenant key.
NOTE:- After a DB instance is created, the disk encryption status and the key cannot be changed. The backup data stored in OBS is not encrypted.
- The key cannot be disabled, deleted, or frozen when being used. Otherwise, the database becomes unavailable.
- For details about how to create a key, see the "Creating a CMK" section in the Data Encryption Workshop User Guide.
Figure 2 Instance class and storage space
Table 3 Specifications Parameter
Description
Specifications
In the x86 CPU architecture, the following specifications can be selected to suit different application scenarios: General-purpose (s6), Enhanced (c3), and Enhanced II (c6).
Dedicated Cloud
If you use DeC, this parameter is displayed.
For details about DB instance specifications in your DeC, see Database Instance Specifications.
Node Class
For details about the DB instance specifications, see DB Instance Specifications.
Storage Space
The value ranges from 10 GB to 3000 GB and must be a multiple of 10.
Figure 3 Network and database configuration
Table 4 Network Parameter
Description
VPC
The VPC where your DB instances are located. A VPC isolates networks for different services, so you can easily manage and configure internal networks and change network configuration. You need to create or select the required VPC. For details about how to create a VPC, see section "Creating a VPC" in the Virtual Private Cloud User Guide. For details about the constraints on the use of VPCs, see Connection Methods.
If there are no VPCs available, DDS allocates resources to you by default.
Subnet
A subnet provides dedicated network resources that are logically isolated from other networks for network security.
After the instance is created, you can change the private IP address assigned by the subnet. For details, see Changing a Private IP Address.
Security Group
A security group controls access between DDS and other services for security.
If there are no security groups available, DDS allocates resources to you by default.
NOTE:Ensure that the security group rule you set allows clients to access DB instances. For example, select the TCP protocol with inbound direction, input the default port number 8635, and enter a subnet IP address or select a security group that the DB instance belongs to.
SSL
Secure Sockets Layer (SSL) certificates set up encrypted connections between clients and servers, preventing data from being tampered with or stolen during transmission.
You can enable SSL to improve data security. After a DB instance is created, you can connect to it using SSL.
Cross-CIDR Access
- Configure
Add the VPC CIDR block of your client. Ensure that the ECS where your client is installed can connect to the DB instance.
NOTE:- To ensure the ECS and the DB instance can communicate with each other, configure the connection by referring to VPC Peering Connection Overview.
- VPC CIDR blocks can only be added, but not modified or deleted.
- Up to 9 CIDR blocks can be configured, and each of them does not overlap.
- Skip
Configure the CIDR block of the client later. After a DB instance is created, you can configure cross-CIDR access by referring to Configuring Cross-CIDR Access.
IPv6
Before enabling IPv6, ensure that IPv6 has been enabled for the VPC and subnet where the DB instance is located. For details about the application scenarios and procedures for enabling IPv6 for the VPC and subnet, see IPv4 and IPv6 Dual-Stack Network.
After IPv6 is enabled, the DB instance can run in dual-stack mode. It means that the DB instance can use both the IPv4 address and IPv6 address. The DB instance can access the Internet using either IPv4 or IPv6 addresses, and the communications are independent of each other.
Anti-affinity Deployment
If you use DeC, this parameter is displayed.
This option is enabled by default. Anti-affinity deployment requires the primary, secondary, and hidden nodes to be deployed on different physical machines to achieve high availability.
Table 5 Database configuration Parameter
Description
Password
- Configure
Enter and confirm the administrator password for connecting to the DB instance.
- Skip
Set the administrator password later. When you need to connect to the DB instance, locate the DB instance and click Reset Password in the Operation column to set a password for connecting to the DB instance.
Administrator
The default account is rwuser.
Administrator Password
Set a password for the administrator. The password is a string of 8 to 32 characters. It must be a combination of uppercase letters, lowercase letters, digits, and special characters. You can also use the following special characters: ~!@#%^*-_=+?
Keep this password secure. If lost, the system cannot retrieve it for you.
Confirm Password
Enter the administrator password again.
Replica Set Parameter Group
The parameters that apply to the replica set instances. After a DB instance is created, you can change the parameter group you configured for the DB instance to bring out the best performance.
For details, see Editing a Parameter Group.
Enterprise Project
Only enterprise users can use this function. To use this function, contact customer service.
An enterprise project is a cloud resource management mode, in which cloud resources and members are centrally managed by project.
Select an enterprise project from the drop-down list. The default project is default.
To customize an enterprise project, click Enterprise in the upper right corner of the console. The Enterprise Management page is displayed. For details, see Creating an Enterprise Project in the Enterprise Management User Guide.
Table 6 Tag Parameter
Description
Tags
This setting is optional. Adding tags helps you better identify and manage your DB instances. Up to 20 tags can be added for a DB instance.
A tag is composed of a key-value pair.
- Key: Mandatory if the DB instance is going to be tagged
- Each tag key must be unique for each DB instance.
- A tag key consists of up to 36 characters.
- The key can only consist of digits, letters, underscores (_), and hyphens (-).
- Value: Optional if the DB instance is going to be tagged
- The value consists of up to 43 characters.
- The value can only consist of digits, letters, underscores (_), dots (.), and hyphens (-).
After a DB instance is created, you can view its tag details on the Tags tab. In addition, you can add, modify, and delete tags for existing DB instances. For details, see Tag.
Table 7 Required duration and quantity Parameter
Description
Validity Period
The system will automatically calculate the fee based on the validity period you have selected.
Auto-renew
- By default, this option is not selected.
- If you select this option, the auto-renew cycle is determined by the selected required duration.
Quantity
The purchase quantity depends on the replica set instance quota. If your current quota does not allow you to purchase the required number of instances, you can apply for increasing the quota as prompted. The yearly/monthly DB instances that are purchased in batches have the same specifications except for the DB instance name and ID.
If you have any question about the price, click Price Details.
DB instance performance is determined by how you configure it during the creation. The hardware configuration items that can be selected include the class and storage space of the replica set.
- Yearly/Monthly
- On the displayed page, confirm the DB instance information.
- Yearly/Monthly
- If you need to modify the specifications, click Previous to return to the previous page.
- If you do not need to modify your settings, click Pay Now to go to the payment page and complete the payment.
- Pay-per-use
- If you need to modify the specifications, click Previous to return to the previous page.
- If you do not need to modify the specifications, click Submit to start the instance creation.
- Yearly/Monthly
- After a DDS DB instance is created, you can view and manage it on the Instance Management page.
- When a DB instance is being created, the status displayed in the Status column is Creating. This process takes about 15 minutes. After the creation is complete, the status changes to Available.
- DDS enables the automated backup policy by default. After a DB instance is created, you can modify or disable the automated backup policy. An automated full backup is immediately triggered after the creation of a DB instance.
- The default DDS port is 8635, but this port can be modified if necessary. If you change the port, you need to add the security group rule to enable access.
- The yearly/monthly DB instances that are purchased in batches have the same specifications except for the DB instance name and ID.
Last Article: Overview
Next Article: Step 2: Set a Security Group
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.