Updated on 2024-01-10 GMT+08:00

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.

Prerequisites

You will be additionally charged for using DeC. Only pay-per-use replica set instances can be purchased through DeC.

Procedure

  1. Go to the Custom Config page.
  2. On the displayed page, select a billing mode and configure information about your DB instance. Then, click Next.

    Figure 1 Basic configurations
    Table 1 Billing Mode

    Parameter

    Description

    Billing Mode

    Select a billing mode, Yearly/Monthly or Pay-per-use.

    • For yearly/monthly instances
    • For pay-per-use instances
      • You are billed for usage based on how much time the service is in use.

    Region

    The region where the resource is located.

    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 purchased. Exercise caution when selecting a region.

    Project

    The project corresponds to the current region and can be changed.

    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.

    Instances can be deployed in a single AZ or three AZs.

    • 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.
    NOTE:

    The 3-AZ deployment is not available in all regions. If the 3-AZ option is not displayed on the page for you to buy an instance, try a different region.

    DB 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.
    • The instance name can be the same as an existing instance name.
    • If you buy a batch of instances at once, a 4-digit numerical suffix will be added to the instance names, starting with -0001. If you later make another batch purchase, the new instance names will be numbered first using any suffixes missing from the sequence of your existing instances, and then continuing on from where your last batch purchase left off. For example, a batch of 3 instances get the suffixes -0001, -0002, and -0003. If you deleted instance 0002 and then bought 3 more instances, the new instances would get the suffixes -0002, -0004, and -0005.
    • After the DB instance is created, you can change its name. 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

    • 4.4
    • 4.2
    • 4.0
    • 3.4

    Nodes

    You can create a three-node, five-node, or seven-node replica set instance.

    CPU Type

    DDS supports x86 and Kunpeng CPU architectures.

    NOTE:

    This parameter is available only for MongoDB 4.0 and 3.4. The default value is Kunpeng.

    • 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

    If you do not use DeC, the storage type is Cloud SSD by default.

    For DeC users, the supported storage types depend on the selected resource type.

    • If you select EVS for Resource Type, Storage Type is set to Cloud SSD.
    • If you select DSS for Resource Type, Storage Type can be set to Common I/O, High I/O, or Cloud SSD.

    Storage Engine

    • WiredTiger

      WiredTiger is the default storage engine of DDS 3.4 and 4.0. WiredTiger provides different granularity concurrency control and compression mechanism for data management. It can provide the best performance and storage efficiency for different kinds of applications.

    • RocksDB

      RocksDB is the default storage engine of DDS 4.2. RocksDB supports efficient point lookup, range scan, and high-speed write. RocksDB can be used as the underlying data storage engine of MongoDB and is suitable for scenarios with a large number of write operations.

    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 instance specifications, see Instance Specifications.

    For details about the performance data of DB instances of different specifications, see Performance White Paper.

    If the CPU or memory of a created DB instance cannot meet service requirements, you can change it on the management console. For details, see Changing a Replica Set Instance Class.

    Storage Space

    If an instance has less than 16 vCPUs, the storage space ranges from 10 GB to 2000 GB.

    If an instance has more than 16 vCPUs, the storage space ranges from 10 GB to 4000 GB.

    The value must be an integer multiple of 10.

    You can scale up an instance after it is created. For details, see Scaling Up a Replica Set Instance.

    NOTE:
    • If the storage space you purchased exceeds 600 GB and the remaining storage space is 18 GB, the instance becomes Read-only.
    • If the storage space you purchased is less than 600 GB and the storage space usage reaches 97%, the instance becomes Read-only.

    In these cases, delete unnecessary resources or expand the capacity.

    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 enable backup data encryption, contact customer service.
    • To check whether the disk is encrypted, you can view Disk Encrypted in the DB instance list.
    • If disk encryption or backup data encryption is enabled, keep the key properly. Once the key is disabled, deleted, or frozen, the database will be unavailable and data may not be restored.

      If disk encryption is enabled but backup data encryption is not enabled, you can restore data to a new instance from backups.

      If both disk encryption and backup data encryption are enabled, data cannot be restored.

    • For details about how to create a key, see "Creating a CMK" in Data Encryption Workshop User Guide.
    Figure 2 Administrator settings
    Table 2 Administrator settings

    Parameter

    Description

    Password

    • Configure

      Enter and confirm the new administrator password. After an instance is created, you can connect to the instance using the password.

    • Skip

      To log in, you will have to reset the password later on the Basic Information page. If you need to connect to an instance after it is created, locate the instance and choose More > Reset Password in the Operation column to set a password for the instance first.

    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.

    Figure 3 Network, Required Duration, and Quantity
    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.

    You will need to create or select the required VPC. For details about how to create a VPC, see "Creating a VPC" in 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 creates one for you by default.

    NOTE:

    After the DDS instance is created, the VPC cannot be changed.

    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.

    NOTE:

    IPv6 subnets are not supported. You are advised to create and select IPv4 subnets.

    Security Group

    A security group controls access between DDS and other services.

    If there are no security groups available, DDS creates one for you by default.

    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:
      • To ensure the ECS and the DB instance can communicate with each other, configure the connection by referring to VPC Peering Connection Overview.
      • Up to 30 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.

    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.

    Figure 4 Advanced settings
    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 Editing a Parameter Template.

    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 Configuring an Automated Backup Policy.

    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.

    Tags

    (Optional) You can add tags to DDS instances so that you can quickly search for and filter specified instances by tag. Each DDS instance can have up to 20 tags.

    • Create a tag.

      You can create tags on the DDS console and configure the tag key and value.

      Key: This parameter is mandatory.
      • Each tag key must be unique for each instance.
      • A tag key consists of up to 36 characters.
      • The key must consist of only digits, letters, underscores (_), and hyphens (-).
      Value: This parameter is optional.
      • The value consists of up to 43 characters.
      • The value must consist of only digits, letters, underscores (_), periods (.), and hyphens (-).
    • Add a predefined tag.

      Predefined tags can be used to identify multiple cloud resources.

      To tag a cloud resource, you can select a created predefined tag from the drop-down list, without entering a key and value for the tag.

      For example, if a predefined tag has been created, its key is Usage and value is Project1. When you configure the key and value for a cloud resource, the created predefined tag will be displayed on the page.

    After an instance is created, you can click the instance name to view its tags. On the Tags page, you can also modify or delete the tags. In addition, you can quickly search for and filter specified instances by tag.

    You can add a tag to an instance after the instance is created. For details, see Adding a Tag.

    If you have any question about the price, click Price Details.

    Instance performance depends on the specifications you select during creation. The hardware configuration items that can be selected include the instance class and storage space.

  3. On the displayed page, confirm the instance details.

    • For yearly/monthly instances
      • If you need to modify the specifications, click Previous to return to the previous page.
      • If you do not need to modify the specifications, read and agree to the service agreement and click Pay Now to go to the payment page and complete payment.
    • For pay-per-use instances
      • If you need to modify the specifications, click Previous to return to the previous page.
      • If you do not need to modify the specifications, read and agree to the service agreement and click Submit to start creating the instance.

  4. Click Back to Instance List. 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.
    • Yearly/Monthly instances that were purchased in batches have the same specifications except for the instance name and ID.