Help Center> Document Database Service> User Guide> Instance Management> Changing the CPU or Memory of a Cluster DB Instance

Changing the CPU or Memory of a Cluster DB Instance

Scenarios

This section describes how to change the CPU or memory of a cluster instance.

  • You can change the CPU and memory of a DB instance only when your account balance is greater than or equal to ¥0.
  • A DB instance cannot be deleted when you are changing its CPU or memory.
  • Instances can be scaled up or down.
  • When the CPU and memory specifications are changed, a primary/secondary switchover may occur once or twice and the database connection will be interrupted 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.

Precautions

  • Instances in pay-per-use mode are still charged based on the time used after the instance CPU or memory is changed.
  • If you change the CPU or memory of a yearly/monthly DB instance, you will pay price difference or get a refund.
    • If you scale up the instance class, you need to pay extra fee based on the period in which instances are put into use.
    • If you scale down the instance class, you will get a refund based on the period in which instances are put into use. 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.

Changing mongos

  1. Log in to the DDS console.
  2. On the Instance Management page, click the target cluster instance.
  3. In the Node Information area on the Basic Information page, click the mongos tab, locate the target mongos, and click Change Instance Class in the Operation column.
  4. On the displayed page, select the new instance class and click Next.

    Figure 1 Scale mongos

  5. On the displayed page, confirm the instance class.

    • Yearly/Monthly
      • If you need to modify your settings, click Previous to go back to the page for you to specify details.
      • If you do not need to modify your settings, click Submit to go to the payment page and complete the payment.
    • Pay-per-use
      • If you need to modify your settings, click Previous to go back to the page for you to specify details.
      • If you do not need to modify your settings, click Submit to change the instance class.

  6. View the DB instance class change result.

    • When the CPU or memory of a DB instance 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 DB 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 mongos tab and view the new instance class.

Changing shard

  1. Log in to the DDS console.
  2. On the Instance Management page, click the target cluster instance.
  3. In the Node Information area on the Basic Information page, click the shard tab, locate the target shard, and click Change Instance Class in the Operation column.
  4. On the displayed page, select the new instance class and click Next.

    Figure 2 Scale shard

  5. On the displayed page, confirm the instance class.

    • Yearly/Monthly
      • If you need to modify your settings, click Previous to go back to the page for you to specify details.
      • If you do not need to modify your settings, click Submit to go to the payment page and complete the payment.
    • Pay-per-use
      • If you need to modify your settings, click Previous to go back to the page for you to specify details.
      • If you do not need to modify your settings, click Submit to change the instance class.

  6. View the DB instance class change result.

    • When the CPU or memory of a DB instance is being changed, the status displayed in the Status column is Changing instance class. This process takes about 25 to 30 minutes.
    • In the upper right corner of the DB 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 instance class.