Updated on 2024-09-25 GMT+08:00

Changing a Cluster Instance Class

This section describes how to change the class of a cluster instance.

Change Rules

Considering the stability and performance of DDS DB instances, you can change the DB instance class according to the rules listed in Table 1. Exercise caution when performing this operation.

Table 1 Change rules

Original Specification

Target Specification

Supported

General-purpose

General-purpose

Enhanced

×

Enhanced II

Enhanced

General-purpose

Enhanced

×

Enhanced II

Enhanced II

General-purpose

×

Enhanced

×

Enhanced II

√ indicates that an item is supported, and × indicates that an item is not supported.

Precautions

  • An instance cannot be deleted while its instance class is being changed.
  • When the instance class is being changed, a primary/secondary switchover may occur once or twice and the database connection will be interrupted each time for up to 30s. You are advised to change the specifications during off-peak hours to reduce impacts and ensure that the service system of your client can reconnect to the database if the connection is interrupted.
  • After the class of a cluster instance is changed, the system will change the value of net.maxIncomingConnections accordingly.
  • A maximum of 16 shard nodes can be selected in each batch of class change.
  • When the CPU or memory of the shard, config, or dds mongos node in a cluster instance is changed, the read replica class is not changed.
  • The classes of read replicas in a cluster instance cannot be changed.
  • The classes of yearly/monthly instance shard nodes can only be upgraded or downgraded one at a time.
  • Changing the class does not cause data loss.
  • If you forcibly change the class of an abnormal node in a DB instance, services may be interrupted.

    To forcibly change the class of an abnormal node, submit a service ticket by choosing Service Tickets > Create Service Ticket in the upper right corner of the management console.

Pre-check Items for Instance Class Change

  • The instance status and the status of the node whose specifications are to be changed are normal.
  • The primary/standby replication delay does not exceed 20s. (This pre-check item applies only to shard and config nodes.)

Pricing

  • Instances billed on a pay-per-use basis are still billed based on the time used after the instance class is changed.
  • If you change the class of a yearly/monthly instance, you will either pay for the difference or receive a refund.
    • If the price of the new instance class is higher than that of the original instance class, you need to pay for the price difference based on the used resource period.
    • If the price of the new instance class is lower than that of the original instance class, you will be refunded the difference based on the used resource period. The refund will be sent to your account. You can click Billing Center in the upper right corner of the console to view your account balance.
  • For details, see Product Pricing Details.

Changing dds mongos Class

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, click the cluster instance name.
  5. In the Node Information area on the Basic Information page, click the dds mongos tab. You can change the class of a single dds mongos node or change the classes of multiple dds mongos nodes at a time.

    • Changing the class of a dds mongos node
      1. In the Operation column of the dds mongos node, click Change Class.
        Figure 1 Changing dds mongos class
      2. On the displayed page, select the required specifications, new class, change mode, and scheduled time, and click Next.
        Figure 2 Changing dds mongos class
    • Changing the classes of multiple dds mongos nodes in batches
      1. Select the target dds mongos nodes and click Change Classes in Batches.
        Figure 3 Changing the classes of multiple dds mongos nodes in batches
      2. On the displayed page, select the required specifications, new class, change mode, and scheduled time, and click Next.
        Figure 4 Changing the classes of multiple dds mongos nodes in batches
        • Online change: The specifications of multiple dds mongos nodes will be changed one by one. The time required depends on the number of instance nodes whose specifications need to be changed. Each node takes about 5 to 10 minutes. You are advised to connect to a DB instance using the HA connection address and ensure that your applications support automatic reconnection.
        • Offline change: The specifications of multiple dds mongos nodes will be changed concurrently and these nodes will be unavailable during the specification change. It takes about 5 to 10 minutes.

  6. On the displayed page, confirm the class.

    • If you need to modify your settings, click Previous.
    • For pay-per-use instances

      If you do not need to modify your settings, click Submit to change the class. After the specifications are changed, you are still charged on an hourly basis.

    • For yearly/monthly instances
      • If you intend to scale down the class, click Submit. The refund is automatically returned to your account.
      • If you intend to scale up the class, click Pay Now. The scaling starts only after the payment is successful.

  7. View the results.

    • When the instance class is being changed, the status displayed in the Status column is Changing instance class. This process takes about 10 minutes.
    • In the upper right corner of the instance list, click to refresh the list. The instance status changes to Available.
    • In the Node Information area on the Basic Information page, click the dds mongos tab and view the new class.

Changing shard Class

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, click the cluster instance name.
  5. In the Node Information area on the Basic Information page, click the shard tab. You can change the class of a single shard or change the classes of multiple shards at a time.

    • Changing the class of a shard
      1. In the Operation column of the shard node, click Change Class.
        Figure 5 Changing the class of a shard

      2. On the displayed page, select the required specifications and new class and click Next.

        The time required depends on the number of instance nodes whose specifications are to be changed. It takes about 5 to 10 minutes for each node. When the instance class is being changed, a primary/secondary switchover may occur once or twice and the database connection will be interrupted each time for up to 30s. Before the specification change, learn about Pre-check Items for Instance Class Change. You are advised to change the class during off-peak hours to reduce impacts and ensure that the service system of your client can reconnect to the database if the connection is interrupted.

        Figure 6 Changing the class of a shard
    • Changing the classes of multiple shards in batches
      1. Select the target shards and click Change Classes in Batches.
        Figure 7 Changing the classes of multiple shards in batches
      2. On the displayed page, select the required specifications and new class and click Next.

        The time required depends on the number of instance nodes whose class is to be changed. It takes about 5 to 10 minutes for each node. When the instance class is being changed, a primary/secondary switchover may occur once or twice and the database connection will be interrupted each time for up to 30s. Before the specification change, learn about Pre-check Items for Instance Class Change. You are advised to change the class during off-peak hours to reduce impacts and ensure that the service system of your client can reconnect to the database if the connection is interrupted.

        Figure 8 Changing the classes of multiple shards in batches

  6. On the displayed page, confirm the class.

    • If you need to modify your settings, click Previous.
    • For pay-per-use instance

      If you do not need to modify your settings, click Submit to change the class. After the specifications are changed, you are still charged on an hourly basis.

    • For yearly/monthly instance:
      • If you intend to scale down the class, click Submit. The refund is automatically returned to your account.
      • If you intend to scale up the class, click Pay Now. The scaling starts only after the payment is successful.

  7. View the results.

    • When the instance class is being changed, the status displayed in the Status column is Changing instance class. This process takes about 25 to 30 minutes.

      High database load increases the specification change duration. You are advised to change the specifications during off-peak hours to reduce impacts.

    • In the upper right corner of the instance list, click to refresh the list. The instance status changes to Available.
    • Go to the Basic Information page of the cluster instance you scaled up, click the shard tab in the Node Information area, and view the new class.

Changing config Class

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page and choose Databases > Document Database Service.
  4. On the Instances page, click the cluster instance name.
  5. In the Node Information area on the Basic Information page, click the config tab, locate the config node, and click Change Class in the Operation column.

    Figure 9 Changing config class

  6. On the displayed page, select the required specifications and new class and click Next.

    The time required depends on the number of instance nodes whose specifications are to be changed. It takes about 5 to 10 minutes for each node. When the instance class is being changed, a primary/secondary switchover may occur once or twice and the database connection will be interrupted each time for up to 30s. Before the specification change, learn about Pre-check Items for Instance Class Change. You are advised to change the specifications during off-peak hours to reduce impacts and ensure that the service system of your client can reconnect to the database if the connection is interrupted.

    Figure 10 Changing config class

  7. On the displayed page, confirm the class.

    • If you need to modify your settings, click Previous.
    • For pay-per-use instances

      If you do not need to modify your settings, click Submit to change the class. After the specifications are changed, you are still charged on an hourly basis.

    • For yearly/monthly instances
      • If you intend to scale down the class, click Submit. The refund is automatically returned to your account.
      • If you intend to scale up the class, click Pay Now. The scaling starts only after the payment is successful.

  8. View the results.

    • When the instance class is being changed, the status displayed in the Status column is Changing instance class. This process takes about 25 to 30 minutes.

      High database load increases the specification change duration. You are advised to change the specifications during off-peak hours to reduce impacts.

    • In the upper right corner of the instance list, click to refresh the list. The instance status changes to Available.
    • Go to the Basic Information page of the cluster instance you scaled up, click the config tab in the Node Information area, and view the new class.