All Products
Search
Document Center

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

Last Updated:Mar 26, 2024

If you enable the serverless feature for an existing common 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 common cluster with defined specifications.

Supported versions

  • A common cluster with defined specifications is purchased. The version of the cluster meets one of the following requirements. For more information about how to purchase a cluster, see Purchase a pay-as-you-go cluster and Purchase a subscription cluster.

    • A cluster of PolarDB for MySQL 5.7 whose revision version is 5.7.1.0.29 or later.

    • A cluster of PolarDB for MySQL 8.0.1 whose revision version is 8.0.1.1.30.1 or later.

    • A cluster of PolarDB for MySQL 8.0.2 whose revision version is 8.0.2.2.19 or later.

    • You cannot enable the serverless feature for a PolarDB for MySQL 5.6 cluster.

  • PolarDB PolarProxy is of V2.4.30 or later. For more information about how to view and upgrade the current version of PolarProxy, see View the version information.

Limits

  • The serverless feature is unavailable for Multi-master Cluster (Database/Table) Edition clusters or clusters that use X-Engine.

  • The serverless feature supports node deletion, manual configuration change, temporary configuration upgrade, automatic scaling of local resources, and automatic configuration change (auto scaling). Therefore, the serverless feature cannot be enabled along with automatic scaling of local resources and automatic configuration change (auto scaling). For more information, see Automatically scale local resources and Automatic configuration changes (auto scaling). After the serverless feature is enabled for a common cluster with defined specifications, automatic scaling of local resources or automatic configuration change (auto scaling) cannot be enabled. Similarly, after automatic scaling of local resources or automatic configuration change (auto scaling) is enabled for a common cluster with defined specifications, the serverless feature cannot be enabled.

  • The serverless feature cannot be enabled for a Cluster Edition cluster with only one primary node. If you want to enable the serverless feature, you must add read-only nodes. For more information, see the "Add a read-only node" section of the Add or remove read-only nodes topic.

  • The serverless feature can be enabled for a Global Database Network (GDN). However, all clusters in the GDN cannot be automatically started or stopped. Each cluster must have at least one read-only node.

  • When you enable the serverless feature for an existing common 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

You can manage a serverless cluster with defined specifications. You can specify the resource scaling ranges for an original single node and a serverless read-only node. In this case, PolarDB automatically scales out or in the cluster within the specified ranges.

Precautions

  • After you enable the serverless feature, you cannot enable automatic scaling of local resources or automatic cluster scale-up for the cluster.

  • 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 top navigation bar, select the region in which the cluster that you want to manage 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 described in the following table and then click OK.

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

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

    Note

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

    Note
    • If the cluster contains only read-only column store nodes, you can configure the number of read-only column store nodes. For more information, see Enable serverless on a read-only column store node.

    • 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 cannot exceed 15 in a cluster.