All Products
Search
Document Center

PolarDB:Overview

Last Updated:Aug 31, 2023

Serverless clusters enable resource scaling depending on your workloads and free you from complex resource evaluation and O&M. This topic describes how a serverless cluster works and its benefits and scenarios.

Databases are a very important part of the IT system of modern enterprises. When you create clusters, you are often conservative to configure the resources such as CPU, memory, storage, and connections and other parameters to ensure that clusters can run smoothly even during peak periods. In this case, your resources are idle during off-peak periods and may be insufficient during peak periods. Serverless clusters can solve this problem. Serverless clusters enable resource scaling depending on your workloads and free you from complex resource evaluation and O&M.

The following figure shows the resource usage and specifications of a common cluster and a serverless cluster in scenarios where business loads fluctuate greatly.Comparison between a common cluster and a serverless clusterThe preceding figure provides the following information:
  • Common cluster: A lot of resources are wasted during off-peak hours. During peak hours, resources are insufficient and business cannot be processed.
  • Serverless cluster:
    • Serverless clusters scale resources based on your business requirements, and a small number of resources are wasted. This improves the resource usage.
    • Serverless clusters can provide sufficient resources during peak hours, which ensures the performance and service stability.
    • The pay-as-you-go billing method can save costs and resources are allocated dynamically to match workloads.
    • No manual configuration changes are required. This improves O&M efficiency and frees O&M and R&D personnel.
    • The automatic start and stop feature is supported for serverless clusters. When no requests are sent to the cluster, the cluster is automatically suspended to release computing resources. When the cluster receives requests, the cluster automatically starts.
      Note You can enable or disable the automatic cluster suspension feature for a serverless cluster with defined specifications.
    • Optimizations are implemented for high-throughput writes and high-concurrency operations with elastic scaling to suit the scenarios in which large amounts of data and large traffic fluctuations are involved.

How it works

PolarDB for MySQL serverless supports real-time scaling of CPU, memory, storage, and network resources to build a new form of PolarDB for MySQL products in an architecture where computing and storage are separated. Serverless clusters also allow you to isolate network resources, namespaces, and storage resources. Serverless clusters support the pay-as-you-go billing method for computing resources and provide the following benefits: low resource usage, ease of use, flexibility, and low price. Serverless clusters can help you quickly and independently scale computing resources to adapt to fluctuating workloads, reduce costs, and improve efficiency. Serverless clusters provide the following advantages over flexible specification changes and automatic storage expansion:
  • If you use serverless clusters, you are charged based on the on-demand resources that are used to run your workloads. This significantly reduces costs.
  • Serverless clusters optimize high-throughput write operations and high-performance batch processing operations and support auto scaling. This is suitable for scenarios in which large amounts of data and large traffic fluctuations are involved.
  • Cluster resource scaling can be completed within a second and without service interruption.

You can create a serverless cluster and use the serverless feature from scratch. This is called a serverless cluster. You can also enable the serverless feature for a common cluster. This is called a serverless cluster with defined specifications.

Architecture of a serverless clusterComputing architecture
  • Serverless PolarProxy

    Serverless PolarProxy uses the serverless architecture and is scaled independent of compute nodes. PolarProxy specifications are not user-defined. Serverless proxy resources are measured in PCUs. A PCU is approximately equal to 1 core and 2 GB of memory.

  • Scale compute nodes of a serverless cluster

    Both the primary node and read-only nodes adopt the serverless architecture. They can scale with workloads and share distributed storage within a single zone.

    For a primary or read-only node of a serverless cluster, the PolarDB for MySQL continuously tracks the PCU usage. If the current PCUs of the primary node or read-only node are insufficient for the workloads, the serverless cluster scales out to use more PCUs. If the current PCUs of the primary node or read-only node exceed the required value, the serverless cluster scales in to reduce PCUs. Nodes in a serverless cluster can be scaled independent of each other. However, one read-only node must be scaled together with the primary node. If the specifications of a read-only node vary significantly from those of the primary node, scaling the read-only node is triggered. Nodes are scaled in units of 0.5 PCUs. If more current PCUs are used by a node, more PCUs are added or removed in the scaling. Serverless compute resources are measured in PCUs. A PCU is approximately equal to 1 core and 2 GB of memory. You can specify the range (1 PCU to 32 PCUs) for scaling a single-node. Scaling a primary or read-only node means the number of PCUs for the node increases or decreases. The system monitors the PCU of the compute node every second.

    Note The maximum number of connections for a serverless cluster is 10500.
  • Serverless cluster storage

    A serverless architecture is used for storage. Therefore, you do not need to specify the storage capacity when you purchase clusters. The storage capacity is automatically increased when the amount of data increases. You are charged for only the storage that you use. On the Overview page of the cluster, you can view Database Storage Usage. For more information, see View the database storage usage.

Architecture of a serverless cluster with defined specificationsA serverless cluster with defined specifications
  • PolarProxy of a serverless cluster with defined specifications

    The PolarProxy is composed of the proxy resources of a common cluster and the serverless proxy resources. The proxy resources of a common cluster are specified when the common cluster is created. Serverless proxy resources are scaled independent of compute nodes and not user-defined. Serverless proxy resources are measured in PCUs. A PCU is approximately equal to 1 core and 2 GB of memory.

  • Scale compute nodes of a serverless cluster with defined specifications

    For a serverless cluster with defined specifications, the resources of the primary node and read-only nodes include defined-specification resources and serverless resources. The defined-specification resources cannot be scaled, while the serverless resources can be scaled depending on workloads.

    For a primary or read-only node of a serverless cluster, the PolarDB for MySQL continuously tracks the PCU usage. If the current PCUs of the primary node or read-only node are insufficient for the workloads, the serverless cluster scales out to use more PCUs. If the current PCUs of the primary node or read-only node exceed the required value, the serverless cluster scales in to reduce PCUs. Nodes in a serverless cluster can be scaled independent of each other. However, one read-only node must be scaled together with the primary node. If the specifications of a read-only node vary significantly from those of the primary node, scaling the read-only node is triggered. Nodes are scaled in units of 0.5 PCUs. If more current PCUs are used by a node, more PCUs are added or removed in the scaling. Serverless compute resources are measured in PCUs. A PCU is approximately equal to 1 core and 2 GB of memory. You can specify the range (1 PCU to 32 PCUs) for scaling a single-node. Scaling a primary or read-only node means the number of PCUs for the node increases or decreases. The system monitors the PCU of the compute node every second.

    Note The maximum number of connections for a serverless cluster with defined specifications is consistent with that for a common cluster with defined specifications. For more information, see Specifications of compute nodes in different editions.
  • Storage of a serverless cluster with defined specifications

    The storage capacity of the common cluster with defined specifications is used. For more information, see Storage overview.

Fees

Fees of a serverless cluster

The fees include compute node fees, storage capacity fees, backup storage fees (only for the part exceeding the free quota), and SQL Explorer fees (optional). For more information, see Billing of serverless clusters.

Fees of a serverless cluster with defined specifications

The fees include the fees of the common cluster and the fees of the serverless feature. For more information about the fees of a common cluster, see Billable items overview. For more information about the fees of the serverless feature, see Billing of serverless clusters.

Benefits

PolarDB for MySQL serverless can dynamically scale cluster resources in seconds depending on business loads. Its core benefits include:
  • High availability

    The multi-node architecture ensures the high availability of serverless clusters. Serverless clusters offers the same service level agreement (SLA) as common clusters to ensures stability.

  • High scalability
    • Wide range

      PolarDB for MySQL serverless supports automatic scale-in/out and provides the widest scaling range in the industry. A single cluster can be scaled between 0 to 1000 cores.

    • Scalability in seconds

      Workload detection is accomplished in five seconds and cluster resources are scaled out within a second when your workloads increase. If your workloads decrease, cluster resources are automatically released in a tiered manner.

    • No business interruption

      The scaling process has no impact on business.

  • Strong data consistency

    Global consistency is provided in high-performance mode. Clusters support strong data consistency. Data can be read immediately after it is written to read-only nodes, while the performance is almost the same as in weak consistency mode.

  • Cost-effectiveness

    Serverless clusters are billed in PCUs to save costs. Costs can be reduced by up to 80%.

  • Zero O&M

    The PolarDB for MySQL serverless team takes responsibility for all operations and maintenance work such as system upgrades, system deployment, scaling, and alert processing. These operations are carried out in the background, and do not affect the services running on the system. This ensures continuous service delivery and allows you to focus on developing your business.

Scenarios

Scenarios of serverless clusters
  • Infrequent access to databases, such as development and test environments
  • Software as a service (SaaS) scenarios, such as website building of small and medium-sized enterprises
  • Individual developers
  • Educational scenarios, such as teaching and student experiments
  • Uncertain load scenarios, such as IoT and edge computing
  • Scenarios in which services are changing or unpredictable
Scenarios of serverless clusters with defined specifications
  • Enterprise-level databases for medium- and large-sized users
  • Satisfying fluctuation requirements based on existing PolarDB for MySQL clusters

Limits

Limits on serverless clusters
Limits on serverless clusters with defined specifications