You can scale the computing resources and storage capacity of AnalyticDB for MySQL clusters to meet your business needs as they change. You can also change the cluster modes to modify the configurations of clusters.

Prerequisites

No renewal orders are overdue within your Alibaba Cloud account.

Background information

AnalyticDB for MySQL supports the following scaling operations:
  • Scale cluster specifications up or down: Modify the number of node groups and storage capacity in Reserved mode, or modify computing resources and elastic I/O resources in Elastic mode.
  • Change the cluster mode: Change the cluster mode from Reserved mode to Elastic mode.

Precautions

  • Scale cluster specifications up or down
    • During a scale-up or scale-down event, you are not allowed to execute the SUBMIT JOB statement to submit asynchronous tasks. If your business requires asynchronous tasks, perform scaling at an appropriate point in time.
    • When cluster specifications are scaled up or down, data in the cluster is migrated and redistributed. The amount of time required for data migration is proportional to the volume of data. During a scale-up or scale-down event, the services provided by the cluster are not interrupted.
    • During a scale-down event, data migration can take up to dozens of hours to complete. Proceed with caution especially when the volume of data is large.
  • Change the cluster mode
    • The cluster mode can be changed only for AnalyticDB for MySQL clusters of V3.1.3.9 and later.

      For more information about how to check the version of a cluster, see How can I view the version of an AnalyticDB for MySQL cluster? To upgrade the version of a cluster, Submit a ticket.

    • When you change the cluster mode, you must apply for new cluster resources, perform full and incremental migration, and switch your business from the existing cluster to the new cluster. The amount of time it takes to complete these tasks depends on the cluster specifications and data volume.
    • During the switchover from the existing cluster to the new cluster, the existing cluster becomes read-only for a period of 5 to 10 minutes.
      After you connect to the existing cluster, execute the following statement to specify the time window for the switchover. In this example, the switchover is performed within a time window of 23:00 to 23:30.
      SET adb_config REPLICATION_SWITCH_TIME_RANGE=`23:00, 23:30`;
      For more information about how to connect to an AnalyticDB for MySQL cluster, see Connect to an AnalyticDB for MySQL cluster.

Billing

For information about the billing of specification changes, see Billing details about specifications changes.

Scale up a cluster

Note
  • Reserved mode: The cluster mode can be changed to Elastic mode. The specifications and storage capacity of an AnalyticDB for MySQL cluster can be individually scaled up. Node groups of the cluster can also be individually scaled out. You can also choose to scale up the specifications and scale out node groups at the same time.
  • Elastic mode: The computing and elastic I/O resources can be individually scaled up. You can also choose to scale up computing and elastic I/O resources at the same time.
  1. Log on to the AnalyticDB for MySQL console by your Alibaba Cloud account.
  2. In the upper-left corner of the page, select the region where clusters reside.
  3. In the left-side navigation pane, click Clusters.
  4. On the V3.0 Clusters tab, click Expansion in the Actions column corresponding to the cluster whose configurations you want to modify.
  5. On the Change Specifications page, modify the configurations of the cluster.
    Table 1. The following table describes the cluster configuration parameters.
    Parameter Description
    Version The version of the cluster. This parameter is automatically set to 3.0. You do not need to specify this parameter.
    Mode The mode of the cluster. Valid values: Elastic Mode and Reserved Mode.
    Note You can change the cluster mode from Reserved Mode to Elastic Mode but not from Elastic Mode to Reserved Mode. For more information about the differences between the two modes, see FAQ.
    Edition The edition of the cluster. The value of Edition depends on that of Mode. The following section describes the editions supported by different modes:
    • When Mode is set to Elastic Mode, Elastic Cluster is automatically selected. You do not need to specify this parameter.
    • When Mode is set to Reserved Mode, Reserved Cluster is automatically selected. You do not need to specify this parameter.
    Note If you change the cluster mode from Reserved Mode to Elastic Mode and you need to use external tables, you must enable ENI in the Network Information section of the Cluster Information page in the console. When you enable ENI, cluster performance and security are not affected.
    Instance Type The instance type of the cluster.
    • If you set Mode to Elastic mode and Edition to Elastic Cluster, the instance type is automatically set to E32. You do not need to specify this parameter.
    • If you set Mode to Reserved Mode and Edition to Reserved Cluster, the instance type can be set to C8 or C32.
    Computing Resources The computing resources of the cluster. Computing resources are used for data computing. More computing resources improve the data query speed. We recommend that you reserve more CPU cores for computing resources than those for data resources.
    Note This parameter is available only when Mode is set to Elastic Mode.
    Elastic IO Resources The elastic I/O resources of the cluster.

    An elastic I/O unit (EIU) is the unit of data that measures the storage performance of clusters in elastic clusters. You can use EIUs to individually scale up storage resources. For more information, see EIUs.

    Note This parameter is available only when Mode is set to Elastic Mode and Computing Resource is set to 32 Cores and 128 GB or higher.
    Node Groups The number of node groups. By default, each node group consists of three nodes (replicas).
    Note This parameter is available only when Mode is set to Reserved Mode.
    Storage Capacity The storage capacity of a single node group. If you purchase multiple node groups, you can use the following formula to calculate the total storage capacity of the cluster: Total storage capacity = Storage capacity of a single node group × Number of node groups.
    Note This parameter is available only when Mode is set to Reserved Mode.
  6. Complete the subsequent operations based on the Product Type value of the cluster before the cluster is scaled up.
    • If Product Type is set to Subscription before the cluster is scaled up, perform the following operations:
      1. Read and select the AnalyticDB for MySQL (Subscription) Terms of Service, and then click Buy Now.
      2. On the Purchase page, confirm the information of the unpaid order and the payment method, and then click Subscribe.
    • If Product Type is set to Pay-As-You-Go before the cluster is scaled up, perform the following operations:

      Read and select the AnalyticDB for MySQL (Pay-As-You-Go) Terms of Service, and then click Buy Now.

Scale down a cluster

  1. Log on to the AnalyticDB for MySQL console by your Alibaba Cloud account.
  2. In the upper-left corner of the page, select the region where clusters reside.
  3. In the left-side navigation pane, click Clusters.
  4. On the V3.0 Clusters tab, choose More > Scale In in the Actions column corresponding to the cluster that you want to scale in.
  5. On the Downgrade page, set the parameters of the cluster. For more information about the parameters, see Table 1.
  6. Complete the subsequent operations based on the Product Type value of the cluster before the cluster is scaled down.
    • If Product Type is set to Subscription before the cluster is scaled down, perform the following operations:
      1. Read and select the AnalyticDB for MySQL (Subscription) Terms of Service, and then click Buy Now.
      2. On the Purchase page, confirm the information of the unpaid order and the payment method, and then click Subscribe.
    • If Product Type is set to Pay-As-You-Go before the cluster is scaled down, perform the following operations:

      Read and select the AnalyticDB for MySQL (Pay-As-You-Go) Terms of Service, and then click Buy Now.