Enable serverless for fixed-specification clusters

更新时间:
复制 MD 格式

You can enable the serverless feature for a purchased cluster with defined specifications that uses a billing method of subscription or pay-as-you-go.

Prerequisites

To enable the serverless feature for a cluster with defined specifications, the cluster must meet the following version requirements:

  • Engine version:

    • MySQL 5.6: Not supported.

    • MySQL 5.7: The minor engine version must be 5.7.1.0.29 or later.

    • MySQL 8.0.1: The minor engine version must be 8.0.1.1.30.1 or later.

    • MySQL 8.0.2: The minor engine version must be 8.0.2.2.19 or later.

  • Database proxy (Proxy) version: Must be 2.4.30 or later.

  • CPU architecture: Must be x86. YiTian ARM is not supported.

Limitations

  • Single-node clusters without a database proxy do not support the serverless feature because they do not meet the prerequisites. To enable this feature, add a node. Newly purchased single-node clusters that meet the version requirements support the serverless feature by default.

  • Enterprise Edition: Manual scale-out/scale-in of storage space is not supported.

  • X-Engine is supported for clusters of the following versions:

    • PolarDB for MySQL 8.0.1 whose revision version is 8.0.1.1.41 or later.

    • PolarDB for MySQL 8.0.2 whose revision version is 8.0.2.2.23 or later.

  • Global Database Network (GDN) is supported, but is subject to the following limits:

    • Automatic start and stop cannot be enabled on all serverless clusters in a GDN.

    • Each serverless cluster in the GDN must have at least one read-only node if the cluster meets the following requirements:

      • PolarDB for MySQL 8.0.1 with revision version 8.0.1.1.42 or later.

      • PolarDB for MySQL 8.0.2 with revision version 8.0.2.2.23 or later.

  • This feature is mutually exclusive with the Elastic scaling with auto scaling feature. If you enable the Serverless feature on a cluster with defined specifications, you can no longer enable the elastic scaling feature. Similarly, if you enable the elastic scaling feature on a cluster with defined specifications, you can no longer enable the Serverless feature.

  • To enable the serverless feature on read-only column store nodes, you must first add a read-only column store node to your cluster with defined specifications. After you add a read-only column store node, you can configure the number of serverless read-only column store nodes that can be added to the cluster.

  • When the serverless feature is enabled on a cluster with defined specifications, vertical scaling of compute nodes is limited by the number of CPU cores:

    • For compute nodes with dedicated specifications, vertical scaling (single-node PCU scaling) is not supported if the node has more than 32 CPU cores.

    • For compute nodes with general-purpose specifications, vertical scaling (single-node PCU scaling) is not supported if the node has more than 16 CPU cores.

Usage notes

  • After you enable the serverless feature on a cluster with defined specifications, the cluster's maximum connections and maximum IOPS are proportional to the configured Maximum Resources for Single Node.

  • When you enable the serverless feature for a cluster with defined specifications, the cluster may be migrated to an idle host if the current host has insufficient resources. We recommend that you enable this feature during off-peak hours.

    Note
    • If you connect to the database using the Primary address, a transient disconnection of 5 to 10 seconds may occur during the migration.

    • If you connect to the database by using a Cluster Endpoint, no disconnection occurs during the migration. We recommend using a Cluster Endpoint

      Cluster Endpoint
    • Cluster Endpoint
    Cluster Endpoint
    Cluster Endpoint
  • After you enable the Serverless feature, the values of parameters such as innodb_buffer_pool_size, loose_thread_pool_size, and table_open_cache adjust dynamically. If you disable the Serverless feature, the parameter values revert to the values they had before the feature was enabled.

Display format

image
  • PolarProxy

    • The PolarProxy of a serverless cluster uses a serverless architecture. PolarProxy resources are independent of compute nodes and automatically scaled. You do not need to define PolarProxy resources.

    • Resources are scaled in units of 0.5 PCUs. The number of PCUs added or removed in a scaling activity is positively correlated with the number of PCUs used.

  • Compute nodes

    • The primary node and read-only nodes of a serverless cluster adopt a serverless architecture. The nodes can scale with workloads and share storage within a single zone.

    • The number of PCUs increases or decreases based on the scaling of the primary node or read-only nodes.

    • Resources are scaled in units of 0.5 PCUs. The number of PCUs added or removed in a scaling activity is positively correlated with the number of PCUs used.

    • You can set the scaling range of a single node in PCUs. The system monitors the PCUs of a compute node every second.

  • Storage

    The storage of a serverless cluster uses the pay-as-you-go billing method. You do not need to specify the storage capacity when you purchase the cluster. The storage capacity is automatically increased when the amount of data increases. You are charged only for the storage space that you use. You can view Database Storage Usage on the Basic Information page of the cluster. For more information, see View the database storage usage.

Note

Billing details

The fees for the Serverless feature on a cluster with defined specifications consist of two parts: the fees for the cluster and the fees for the Serverless feature. For more information, see Billing details for clusters with defined specifications and Serverless billing details.

Procedure

Choose one of the following two ways to Enable Serverless:

  • On the PolarDB purchase page, in the Specification and Proxy section, select Enable Serverless.

    image

  • Log on to the PolarDB console. In the navigation pane on the left, click Clusters. Select the region of the cluster and click the cluster ID to go to the cluster details page.

    1. On the Basic Information page, in the Database Nodes section, click Enable Serverless.

      Enable Serverless.png

    2. In the Enable Serverless dialog box, set the following parameters and click OK.

      • Maximum Resources for Single Node (Maximum value): As shown in Appearance, this parameter specifies the upper limit of Serverless resources for existing nodes in a cluster with defined specifications. This is the upper limit for scale-up. Valid values: 0 to 16 PCU.

      • Minimum Resources for Single Node (Minimum value): As shown in Appearance, this parameter specifies the lower limit of Serverless resources for existing nodes in a cluster with defined specifications. This is the lower limit for scale-down. Valid values: 0 to 16 PCU. The minimum value must be less than or equal to the maximum value.

      Note
      • PCU stands for PolarDB Capacity Unit. One PCU provides service capabilities that are equivalent to a 1-core CPU and 2 GB of memory. PCU is the unit of measurement for resource scaling in PolarDB Serverless clusters. The minimum unit for a single scaling event is 0.5 PCU.

      • This value does not include the existing resources of the cluster with defined specifications. After you set the limits, the vertical scaling range for existing nodes is: (Defined Specifications + Minimum Setting) to (Defined Specifications + Maximum Setting).

      • The vertical scaling range for Serverless read-only nodes that are added by scaling out is 1 to 32 PCU by default. You do not need to configure this.

      • Example: If you set Minimum Resources for Single Node to 2 PCU and Maximum Resources for Single Node to 8 PCU, the resource specification for existing nodes becomes Defined Specifications + 2 PCU (approximately 2 cores and 4 GB of resources). When the system detects an increased workload, it automatically adds PCUs to the node. However, based on your settings, the resources can scale up to a maximum of 8 PCU (approximately 8 cores and 16 GB of resources). This means the resource specification for existing nodes can scale up to a maximum of Defined Specifications + 8 PCU (approximately 8 cores and 16 GB of resources).

      • Maximum Read-only Nodes: Specifies the maximum number of Serverless read-only nodes that can be added to the cluster. Valid values: 0 to 15.

      • Minimum Read-only Nodes: Specifies the minimum number of Serverless read-only nodes that can be added to the cluster. Valid values: 0 to 15. This value cannot be greater than the maximum value.

      Note
      • This value does not include the number of existing read-only nodes in the cluster.

      • If the cluster with defined specifications does not have any read-only column store nodes, this parameter is not displayed.

      • Example: If you set Minimum Read-only Nodes to 1 and Maximum Read-only Nodes to 2, the cluster adds one read-only node to the original number of read-only nodes. When the system detects an increased workload, it automatically adds more read-only nodes. However, based on your settings, a maximum of two read-only nodes can be added to the original number.

      • Number of read-only column store nodes: Specifies the number of Serverless read-only column store nodes to add to the cluster. Valid values: 0 to 15.

        Note
        • This value does not include the number of existing read-only column store nodes in the cluster.

        • If the cluster with defined specifications does not have any read-only column store nodes, this parameter is not displayed.

      Note

      The maximum number of read-only nodes in a cluster is 15. Therefore, the total number of existing read-only nodes, added Serverless read-only nodes, and added Serverless read-only column store nodes cannot exceed 15.

Related documents

Related APIs

API

Description

EnableDBClusterServerless

Enables the Serverless feature for a cluster with defined specifications (steady-state Serverless).

DescribeDBClusterServerlessConf

Queries the Serverless configuration of a cluster.