Custom Config
This section describes how to purchase a replica set instance in custom mode on the management console. You can customize the computing resources and storage space of a replica set instance based on your service requirements. In addition, you can configure advanced settings, such as slow query log and automated backup.
Precautions
Each account can create up to 50 replica set instances.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and a project.
- Click Service List. Under Database, click Document Database Service to go to the DDS console.
- On the Instances page, click Create DB Instance.
- Click the Custom Config tab.
- Specify instance details and click Create Now.
Table 1 Billing Mode Parameter
Description
Region
The region where the resource is located. For details, see Region and AZ.
NOTE:Instances deployed in different regions cannot communicate with each other through a private network, and you cannot change the region of an instance once it is created. Exercise caution when selecting a region.
AZ
An AZ is a part of a region with its own independent power supply and network. AZs are physically isolated but can communicate through internal network connections. For details, see Region and AZ.
- If your service requires low network latency between instances, you deploy the components of the instance in the same AZ. If you select a single AZ to deploy your instance, anti-affinity deployment is used by default. With an anti-affinity deployment, your primary, secondary, and hidden nodes are deployed on different physical machines for high availability.
- If you want to deploy an instance across AZs for disaster recovery, select three AZs. In this deployment mode, the primary, secondary, and hidden nodes are evenly distributed across three AZs.
DB Instance Name
- The instance name can be the same as an existing instance name.
- The instance name that you specify after the purchase. The instance name must contain 4 to 64 characters and must start with a letter. It is case sensitive and can contain letters, digits, hyphens (-), and underscores (_). It cannot contain other special characters.
- You can change the name of an instance after it is created. For details, see Changing an Instance Name.
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
- 5.0
- 4.4
- 4.2
- 4.0
- 3.4
CPU Type
DDS supports x86 and Kunpeng CPU architectures.
- x86
x86 CPUs use the Complex Instruction Set Computing (CISC) instruction set. Each instruction can be used to execute low-level hardware operations. CISC instructions vary in length, and tend to be complicated and slow compared to Reduced Instruction Set Computing (RISC).
- Kunpeng
The Kunpeng CPU architecture uses RISC. The RISC instruction set is smaller and faster than CISC, thanks to the simplified architecture. Kunpeng CPUs also offer a better balance between power and performance than x86.
Kunpeng CPUs offer a high density, low power option that is more cost effective for heavy workloads.
Storage Type
Ultra-high I/O
Storage Engine
WiredTiger
Specifications
With an x86 architecture, you have the following options:
- General-purpose (s6): S6 instances are suitable for applications that require moderate performance generally but occasional bursts of high performance, such as light-workload web servers, enterprise R&D and testing environments, and low- and medium-performance databases.
- Enhanced II (c6): C6 instances have multiple technologies optimized to provide stable powerful compute performance. 25 GE intelligent high-speed NICs are used to provide ultra-high bandwidth and throughput, making it an excellent choice for heavy-load scenarios. It is suitable for websites, web applications, general databases, and cache servers that have higher performance requirements for compute and network resources; and medium- and heavy-load enterprise applications.
Node Class
For details about the CPU and memory of a DB instance, see Replica Set. If the CPU or memory of a DB instance you have created cannot meet service requirements, you can change it. For details, see Changing a Replica Set Instance Class.
Storage Space
The minimum storage space is 10 GB. If the instance has fewer than 8 vCPUs, the maximum storage that can be scaled up to is 5,000 GB. If the instance has 8 or more vCPUs, the maximum storage that can be scaled up to is 10,000 GB. The storage space must be a multiple of 10.
The storage space can be scaled up. For details, see section Scaling Up a Replica Set Instance.
Disk Encryption
- Disabled: Disable encryption.
- Enabled: Enable encryption. 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 an instance is created, the disk encryption status and the key cannot be changed. Disk encryption will not encrypt backup data stored in OBS.
- To check whether the disk is encrypted, you can view Disk Encrypted in the DB instance list.
- For details about how to create a key, see "Creating a CMK" in Key Management Service User Guide.
- Disk encryption supports only the AES_256 key algorithm.
Table 2 Administrator settings Parameter
Description
Administrator
The default account is rwuser.
Administrator Password
Set a password for the administrator. The password must be 8 to 32 characters in length and contain uppercase letters, lowercase letters, digits, and at least one of the following special characters: ~!@#%^*-_=+?()$
Keep this password secure. If lost, the system cannot retrieve it for you.
Confirm Password
Enter the administrator password again.
Table 3 Network Parameter
Description
VPC
The VPC where your DB instances are located. A VPC isolates networks for different services. It allows you to easily manage and configure private networks and change network configurations.
Subnet
A subnet provides dedicated network resources that are logically isolated from other networks for security reasons.
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.
NOTE:Ensure that there is a security group rule configured that allows clients to access instances. For example, select an inbound TCP rule with the default port 8635, and enter a subnet IP address or select a security group that the instance belongs to.
SSL
Secure Sockets Layer (SSL) encrypts connections between clients and servers, preventing data from being tampered with or stolen during transmission.
You can enable SSL to improve data security. After an instance is created, you can connect to it using SSL.
Database Port
The default DDS port is 8635, but this port can be modified if necessary. If you change the port, add a corresponding security group rule to allow access to the instance.
Cross-CIDR Access
- Configure
If a client and a replica set instance are deployed in different CIDR blocks and the client is not in 192.168.0.0/16, 172.16.0.0/24, or 10.0.0.0/8, configure Cross-CIDR Access for the instance to communicate with the client.
NOTE:- Up to 9 CIDR blocks can be configured, and each of them can overlap but they cannot be the same. That is, the source CIDR blocks can overlap but cannot be the same. The CIDR blocks cannot start with 127. The allowed IP mask ranges from 8 to 32.
- 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.
Table 4 Advanced settings Parameter
Description
Replica Set Parameter Template
The parameters that apply to the replica set instances. After an instance is created, you can change the parameter template you configured for the instance to bring out the best performance.
For details, see Parameter Template Management.
Automated Backup
DDS enables an automated backup policy by default, but you can disable it after an instance is created. An automated full backup is immediately triggered after the creation of an instance.
For details, see .
Retention Period (days)
Retention Period refers to the number of days that data is kept. You can increase the retention period to improve data reliability.
The backup retention period is from 1 to 732 days.
Time Window
The backup interval is 1 hour.
NoteInstance performance depends on the specifications you select during creation. The hardware configuration items that can be selected include the instance class and storage space.
- On the displayed page, confirm the instance details.
- 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 creating the instance.
- After a DDS instance is created, you can view and manage it on the Instances page.
- When an 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.
- Precautions
- Procedure