All Products
Search
Document Center

AnalyticDB for MySQL:Multi-cluster scaling model

Last Updated:Apr 19, 2024

AnalyticDB for MySQL Data Lakehouse Edition (V3.0) supports a multi-cluster scaling model for resource groups. When you create an interactive resource group, you can enable the multi-cluster feature. A multi-cluster resource group consists of one or more compute clusters. The multi-cluster scaling model allows AnalyticDB for MySQL to automatically scale resources based on query loads to meet resource isolation and high concurrency requirements for resource groups. A cluster in the multi-cluster scaling model refers to a compute cluster that consists of computing resources.

What is a multi-cluster resource group?

If the multi-cluster feature is not enabled, only a single compute cluster executes queries in a resource group. After you submit queries to the resource group, the queries are executed by sharing all computing resources of the resource group. If a large number of queries are executed in the resource group, resource contention occurs and the query response slows down. When the number of concurrent queries reaches the upper limit of the resource group, queries are queued.

A multi-cluster resource group consists of one or more compute clusters. You can apply for cluster resources from the resource group to handle the changing query loads in a static or dynamic manner. After user queries are sent to access nodes, the queries are sent to different compute clusters in the resource group for computing. The compute clusters independently execute queries without affecting each other. The following figure shows how a multi-cluster resource group executes queries.image.png

Multi-cluster resource groups can improve the concurrency of small and medium-sized queries and eliminate resource contention. However, multi-cluster resource groups cannot accelerate slow queries or extract-transform-load (ETL) jobs.

Usage notes

  • The multi-cluster scaling model is suitable only for interactive resource groups.

  • You cannot enable the multi-cluster feature for an existing resource group. After the minor version of your AnalyticDB for MySQL cluster is updated, you can create an interactive resource group with the multi-cluster feature enabled.

  • You cannot enable the resource scaling plan and the multi-cluster feature for the same interactive resource group.

Benefits of multi-cluster resource groups

For a resource group without the multi-cluster feature enabled, if your query load increases to the point where you need more computing resources to meet your business requirements, you must perform the following operations:

  • Resize the resource group or send specific queries to other resource groups to offload the pressure of the resource group.

  • If resource contention occurs between large queries and small queries and affects the response speed of small queries, send large queries to job resource groups.

  • After your query load decreases, downsize the resource group to remove redundant computing resources and reduce costs.

If the multi-cluster feature is enabled for a resource group, multiple compute clusters of the same size can work together to execute queries in the resource group. Multi-cluster resource groups provide the following benefits:

  • In elastic mode, you do not need to resize the resource group to handle fluctuating query loads. AnalyticDB for MySQL automatically starts or shuts down compute clusters.

  • In maximum mode, you can control the total amount of computing resources in the resource group by increasing or decreasing the number of compute clusters as needed.

  • Compute clusters are mutually isolated from each other in a resource group. Large queries affect only the compute cluster where they reside, not other compute clusters.

Billing rules

After you enable the multi-cluster feature for an interactive resource group, you are charged for the multi-cluster resource group based on the fees of reserved computing resources and elastic resources in AnalyticDB for MySQL Data Lakehouse Edition (V3.0). For more information, see Pricing for Data Lakehouse Edition (V3.0).

  • Reserved computing resources: the reserved computing resources that are purchased when you create a cluster.

  • Elastic resources: the resources corresponding to the increased compute clusters in the resource group. Formula: Total resources used - Reserved computing resources.

Enable the multi-cluster feature

  1. Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. On the Data Lakehouse Edition (V3.0) tab, find the cluster that you want to manage and click the cluster ID.

  2. In the left-side navigation pane, choose Cluster Management > Resource Management. On the page that appears, click the Resource Groups tab.

  3. In the upper-right corner of the tab, click Create Resource Group. In the panel that appears, configure the parameters that are described in the following table.

    Note

    When you enable the multi-cluster feature, we recommend that you set the Mode parameter to Elastic and specify an appropriate value for the Cluster Size parameter. You can configure an appropriate number of concurrent queries based on the cluster size. In addition, set the Maximum Clusters parameter to a small value. For example, set the Maximum Clusters parameter to 3 and the Minimum Clusters parameter to 1. As your query load fluctuates over time, you can modify the cluster size and the maximum and minimum numbers of compute clusters to meet your business requirements.

    Parameter

    Description

    Resource Group Name

    The name of the resource group. The name must be 2 to 30 characters in length and can contain letters, digits, and underscores (_). The name must start with a letter.

    Job Type

    The task type of the resource group. Set this parameter to Interactive.

    The multi-cluster scaling model is suitable only for interactive resource groups.

    Cluster Size

    The size of a single compute cluster. Unit: AnalyticDB compute units (ACUs). The minimum value is 16 ACUs.

    Note

    The cluster size is not subject to the reserved computing resources in AnalyticDB for MySQL Data Lakehouse Edition (V3.0). If the cluster size is greater than the reserved computing resources, you are charged for the excess part based on elastic resources. For more information, see Pricing for Data Lakehouse Edition (V3.0).

    Enable Multi-cluster

    Specifies whether to enable the multi-cluster feature.

    Mode

    The mode in which the multi-cluster resource group runs in AnalyticDB for MySQL Data Lakehouse Edition (V3.0). Valid values:

    • Elastic: allows you to specify different values for the Minimum Clusters and Maximum Clusters parameters. In this mode, AnalyticDB for MySQL starts or shuts down compute clusters based on the query load on the resource group.

      • The initial number of compute clusters in the resource group is equal to the value of the Minimum Clusters parameter. As the number of concurrent user queries increases for the resource group and queries start to queue due to insufficient resources, AnalyticDB for MySQL automatically starts additional compute clusters, up to the value of the Maximum Clusters parameter.

      • As the query load on the resource group decreases, AnalyticDB for MySQL automatically shuts down excess compute clusters, down to the value of the Minimum Clusters parameter.

    • Maximum: allows you to specify the same value for the Minimum Clusters and Maximum Clusters parameters. The specified value must be greater than or equal to 2. In this mode, when the resource group is created, AnalyticDB for MySQL starts all the specified compute clusters.

      This mode is effective for statically controlling the total amount of computing resources in the resource group, particularly if you have large numbers of concurrent user queries and the numbers do not fluctuate significantly.

    Minimum Clusters

    The minimum number of compute clusters that you must run in the resource group. The value must be less than or equal to the maximum number of compute clusters. The minimum value is 1.

    Maximum Clusters

    The maximum number of compute clusters that you can run in the resource group. The maximum value is 10.

  4. Click OK.

    After you enable the multi-cluster feature, you can view the value of the Min/Max/Running Clusters parameter on the Resource Groups tab. You can also click Monitor in the Actions column to view metrics of the resource group.

Appendix: Scaling rules for multi-cluster resource groups

When you scale a multi-cluster resource group, the change to the number of compute clusters depends on whether the resource group runs in elastic mode or maximum mode.

Elastic mode

  • Increase the maximum number of compute clusters: Before your query load meets the scale-out requirements, the number of running compute clusters does not change.

  • Decrease the maximum number of compute clusters: If the number of running compute clusters is greater than the specified maximum number of compute clusters, new queries are not sent to the excess compute clusters. After existing queries are executed on the excess compute clusters, AnalyticDB for MySQL shuts down compute clusters to the specified maximum number of compute clusters.

  • Increase the minimum number of compute clusters: Additional compute clusters immediately start to meet the specified minimum number of compute clusters.

  • Decrease the minimum number of compute clusters: If the number of running compute clusters is greater than the specified minimum number of compute clusters, AnalyticDB for MySQL shuts down compute clusters to the specified minimum number of compute clusters when your query load meets the scale-in requirements within a 5-minute time window.

Maximum mode

  • Increase the maximum number and minimum number of compute clusters: The specified number of compute clusters immediately start.

  • Decrease the maximum number and minimum number of compute clusters: New requests are not sent to excess compute clusters. After existing queries are executed, the excess compute clusters shut down.