All Products
Search
Document Center

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

Last Updated:Jul 17, 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, its 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, its 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, its 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 Database Edition of the cluster cannot be Standard Edition.

Limits

  • You cannot enable the serverless feature for a cluster whose Edition is Multi-master Cluster (Database/Table) or a cluster that uses X-Engine.

  • 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 auto scaling of local resources or auto scaling of cluster specifications for the cluster. After you enable auto scaling of local resources or auto scaling of cluster specifications for an existing cluster with defined specifications, you cannot enable the serverless feature for the cluster.

  • You cannot enable the serverless feature for a cluster that has only one primary node. To enable the serverless feature for such a cluster, you must add read-only nodes to the cluster. For information about how to add a read-only node to a cluster, see Add a read-only node.

  • 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 scaling ranges for the nodes. For more information, see Enable the serverless feature on a read-only column store node.

  • To enable the serverless feature for a Global Database Network (GDN), ensure that all clusters in the GDN cannot be automatically started or stopped and each cluster has at least one read-only node.

  • When you enable the serverless feature for an existing cluster with defined specifications, PCU resource scaling for a single node is subject to the following limits:

    • If a compute node in the common cluster with dedicated specifications has more than 32 CPU cores, PCU resource scaling for a single node is not supported.

    • If a compute node in the common cluster of general-purpose specifications has more than 16 CPU cores, PCU resource scaling for a single node is not supported.

Background information

If you enable the serverless feature for an existing common cluster with defined specifications, the cluster becomes a serverless cluster with defined specifications. For a serverless cluster with defined specifications, the resources of the PolarProxy, primary node, and read-only nodes include defined-specification resources and serverless resources. Defined-specification resources cannot be scaled, while 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 added serverless read-only nodes in the cluster. This way, PolarDB auto-scales 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 for a cluster with defined specifications, see Billable items. For information about the fees related with the serverless feature, see Billing.

Usage notes

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

  • 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. If 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 where the cluster to which you want to connect 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 that the original single node can scale up to within the cluster, as shown in the Architecture of a serverless cluster with defined specifications figure. Valid values: 0 to 16 PCUs.

    Note
    • This 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 that the original single node can scale up to within the cluster, as shown in the Architecture of a serverless cluster with defined specifications figure. Valid values: 0 to 16 PCUs.

    Note
    • This 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

    This 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

    This 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.