All Products
Search
Document Center

PolarDB:Enable the serverless feature for a cluster with defined specifications

更新時間:Oct 30, 2024

If you enable the serverless feature for an existing cluster with defined specifications, the cluster becomes a serverless-enabled cluster with defined specifications. This topic describes how to enable the serverless feature for an existing cluster with defined specifications.

Version requirements

To enable the serverless feature for an existing cluster with defined specifications, make sure that the cluster meets the following version requirements:

  • For a cluster whose major version is PolarDB for MySQL 5.7, the revision version must be PolarDB for MySQL 5.7.1.0.29 or later.

  • For a cluster whose major version is PolarDB for MySQL 8.0.1, the revision version must be PolarDB for MySQL 8.0.1.1.30.1 or later.

  • For a cluster whose major version is PolarDB for MySQL 8.0.2, the revision version must be PolarDB for MySQL 8.0.2.2.19 or later.

  • The version of PolarDB PolarProxy is 2.4.30 or later.

  • The cluster version cannot be PolarDB for MySQL 5.6.

  • The cluster is not a PolarDB for MySQL Standard Edition cluster.

Limits

  • The serverless feature is mutually exclusive with the auto scaling of local resources and auto scaling of cluster specifications features. After you enable the serverless feature for an existing cluster with defined specifications, you cannot enable the auto scaling of local resources or auto scaling of cluster specifications feature for the cluster. Similarly, after you enable the auto scaling of local resources or auto scaling of cluster specifications feature for an existing cluster with defined specifications, you cannot enable the serverless feature for the cluster.

  • You cannot enable the serverless feature for a single-node cluster for which PolarProxy is not configured. To enable the serverless feature for such a cluster, add nodes to the cluster. For information about how to add read-only nodes to a cluster, see Add a read-only node. You can enable the serverless feature for a new single-node cluster that meets the version requirements.

  • To enable the serverless feature on column store nodes in an existing cluster with defined specifications, add read-only column store nodes to the cluster. After you add read-only column store nodes, you can configure resource scaling ranges for the nodes. For more information, see Enable the serverless feature on a read-only column store node.

  • You can add a serverless cluster to a Global Database Network (GDN). All serverless clusters in a GDN cannot be automatically started or stopped and each serverless cluster must have at least one read-only node.

  • X-Engine is supported on serverless clusters that run one of the following versions: PolarDB for MySQL 8.0.1 whose revision version is later than 8.0.1.1.41 and PolarDB for MySQL 8.0.2 whose revision version is later than 8.0.2.2.23.

  • PolarDB capacity unit (PCU) resource scaling for a compute node of a serverless cluster with defined specifications is subject to the following limits:

    • For a compute node of dedicated specifications, PCU resource scaling is not supported if the node has more than 32 CPU cores.

    • For a compute node of general-purpose specifications, PCU resource scaling is not supported if the node has more than 16 CPU cores.

Background information

If you enable the serverless feature for an existing cluster with defined specifications, the cluster becomes a serverless-enabled cluster with defined specifications. For a serverless cluster with defined specifications, the resources of PolarProxy, the primary node, and read-only nodes include defined-specification resources and serverless resources. Defined-specification resources cannot be scaled, but serverless resources can be scaled based on workloads.

Architecture of a serverless cluster with defined specifications

p575585.png

After you enable the serverless feature for a cluster with defined specifications, you can define the scaling limits for the original nodes and automatically add serverless read-only nodes in the cluster. This allows PolarDB to automatically scale resources for the cluster within the specified limits.

Billing

The fees of a serverless-enabled cluster with defined specifications include two parts: fees for the cluster with defined specifications and fees related to the serverless feature. For information about the fees of a cluster with defined specifications, see Billable items. For information about the fees related to the serverless feature, see Billing.

Usage notes

  • After you enable the serverless feature for an existing cluster with defined specifications, when the resources on the cluster are insufficient, a migration to an idle cluster may be triggered. We recommend that you enable the serverless feature during off-peak hours.

    Note
    • If you use the primary endpoint to connect to the database, a transient connection lasts for 5 to 10 seconds may occur during the cluster migration.

    • If you use a cluster endpoint to connect to the database, no transient connections occur during the cluster migration. Therefore, we recommend that you use a cluster endpoint to connect to the database and enable the failover with hot replica feature. For more information, see Endpoints and Imperceptible failover within seconds.

  • After you enable the serverless feature for an existing cluster with defined specifications, you cannot enable the auto-scaling of local resources or auto-scaling of specifications feature.

  • After you enable the serverless feature for an existing cluster with defined specifications, the maximum number of connections to the cluster and the maximum IOPS of the cluster are proportional to the specified value of the Maximum Resources for Single Node parameter.

  • After you enable the serverless feature, the values of parameters such as innodb_buffer_pool_size, loose_thread_pool_size, and table_open_cache are dynamically adjusted. When you disable the serverless feature, the parameter values are restored to those before the serverless feature is enabled.

Procedure

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region in which the cluster is deployed.

  3. Find the cluster and click its ID.

  4. In the Database Nodes section of the Basic Information page, click Enable Serverless.

    开启serverless.png

  5. In the Enable Serverless dialog box, configure the parameters and then click OK. The following table describes the parameters.

    Parameter

    Description

    Maximum Resources for Single Node

    The maximum amount of serverless resources to which the original single node can scale up within the cluster, as shown in the Architecture of a serverless cluster with defined specifications figure. Valid values: 0 to 16. Unit: PCUs.

    Note
    • The parameter value does not include the original defined-specification resources in the cluster. After you configure this parameter, the original single node in the cluster can be scaled within the following range: (Defined specifications + Specified lower limit) to (Defined specifications + Specified upper limit).

    • The default resource scaling range of a serverless read-only node is from 1 PCU to 32 PCUs. You do not need to specify the range.

    Minimum Resources for Single Node

    The minimum amount of serverless resources to which the original single node can scale down within the cluster, as shown in the Architecture of a serverless cluster with defined specifications figure. Valid values: 0 to 16. Unit: PCUs.

    Note
    • The parameter value does not include the original defined-specification resources in the cluster. After you configure this parameter, the original single node in the cluster can be scaled within the following range: (Defined specifications + Specified lower limit) to (Defined specifications + Specified upper limit).

    • The default resource scaling range of a serverless read-only node is from 1 PCU to 32 PCUs. You do not need to specify the range.

    Maximum Number of Read-only Nodes

    The maximum number of read-only row store nodes that can be added to the cluster. Valid values: 0 to 15.

    Note

    The parameter value does not include the number of original read-only nodes in the cluster.

    Minimum Number of Read-only Nodes

    The minimum number of read-only row store nodes that can be added to the cluster. Valid values: 0 to 15.

    Note

    The parameter value does not include the number of original read-only nodes in the cluster.

    Note

    A cluster can contain up to 15 read-only nodes. Therefore, the sum of the numbers of original read-only nodes, new read-only row store nodes, and new read-only column store nodes in a cluster cannot exceed 15.