Experience the ultimate elasticity of PolarDB for MySQL Serverless for free

Updated at:
Copy as MD

This topic describes how to experience the ultimate elasticity of the PolarDB for MySQL serverless feature for free.

Background

PolarDB for MySQL Serverless is a cloud-native database that dynamically scales resources. Its multi-node architecture ensures high availability (HA) for clusters. A single cluster supports seamless scaling from 0 to 1,000 cores and can scale up in seconds. This allows it to handle sudden workload spikes without affecting your services.

The following figure shows the resource usage and specification changes for common clusters and serverless clusters in a scenario with fluctuating workloads:

普通集群和Serverless集群对比图.png

As shown in the figure, in a scenario with fluctuating workloads:

  • Common clusters waste resources during off-peak periods and lack sufficient resources during peak periods, which can disrupt your services.

  • Serverless clusters:

    • Because their specifications adjust to business demands in real time, they minimize resource waste. This improves resource utilization and reduces usage.

    • They fully meet business demands even during peak periods. This ensures business continuity and improves system stability.

    • They replace the fixed-resource payment model with a pay-as-you-go model that dynamically matches resources to the load. This can result in significant cost savings.

    • They eliminate the need for manual specification changes, which improves operations and maintenance (O&M) efficiency and the experience for operations and development staff.

    • They support automatic start and stop. When there are no connections, the cluster automatically pauses to save computing costs. When a request arrives, the cluster seamlessly resumes.

    • They are optimized for high-throughput write and high-concurrency scenarios. They also provide elastic scaling capabilities. This makes them suitable for businesses with large data volumes and typical peak and off-peak access patterns.

The Alibaba Cloud Database Solution Performance & Price Competitiveness Experience Center simulates a scenario where a client sends write requests to PolarDB. This lets you experience the intelligent elastic capabilities of the primary node's serverless feature. A Sysbench script accesses the cluster endpoint to perform stress testing. The specifications of the PolarDB primary node automatically scale based on the load, which demonstrates its serverless capabilities.

You can experience the ultimate elasticity of the PolarDB for MySQL serverless feature online without purchasing any resources.

Impact

This performance and price competitiveness experience does not involve deployment in a production environment. Therefore, it will not affect your business.

Costs

The resources used during this experience are provided by Alibaba Cloud, so you will not incur any costs. You can proceed with the experience at no charge.

Experience content

Experience environment

In this free experience, Alibaba Cloud provides a pre-configured environment for you to use. The details of the environment are as follows:

  • A PolarDB for MySQL serverless cluster is provided. Details are as follows:

    • Kernel version: 8.0.1.1.38.2

    • Single-node scaling range: 1 to 32 PCUs

    • Storage class: PSL5

  • A stress testing machine with the Sysbench tool installed is provided. It runs stress testing tasks on the PolarDB for MySQL serverless cluster. The stress testing details are as follows:

    • Test modes: oltp_read_write, oltp_read_only, oltp_write_only, oltp_delete, oltp_update_index, oltp_update_non_index, and oltp_insert.

      Test mode

      Description

      oltp_read_write

      Tests the read and write performance of the cluster's primary node.

      oltp_read_only

      Tests the read-only performance of the cluster's primary node.

      oltp_write_only

      Tests the write performance of the cluster's primary node.

      oltp_delete

      Tests the delete performance of the cluster's primary node.

      oltp_update_index

      Tests the performance of updating indexed fields on the cluster's primary node.

      oltp_update_non_index

      Tests the performance of updating non-indexed fields on the cluster's primary node.

      oltp_insert

      Tests the insert performance of the cluster's primary node.

      Note

      This topic uses the oltp_write_only mode as an example in the following sections.

    • Stress testing table size: 16 tables, with 1 million rows of data in each table

    • Stress testing pace: The test starts with 4 threads. The number of threads increases by 4 every 30 seconds until it reaches 32. After reaching 32 threads, the number decreases by 4 every 30 seconds until it returns to 4. The test then continues at 4 threads until it ends.

    • Stress testing duration: 10 minutes in total

Metrics to observe

  • TPS (Transactions Per Second): The number of transactions the database executes per second, based on the number of successful COMMITs. This metric is used to observe cluster performance.

  • Number of PCUs: The compute resources of a PolarDB Serverless cluster are measured in PCUs (PolarDB Capacity Units). One PCU is approximately equal to 1 core and 2 GB of memory. 0.5 PCU is approximately equal to 0.5 cores and 1 GB of memory.

Procedure

  1. Go to the Business Foundation System Solution Center.

  2. Click Performance and Price Competitiveness Experience, and then click the Free Trial button for Serverless Elasticity & Price Competitiveness Observation to open the following page:

  3. In the stress testing options, set Product to PolarDB MySQL and Tool to Sysbench.

  4. At the bottom of the page, click the Create Free Trial Task button.

  5. Select a Test Mode, and then click OK in the dialog box that appears to create the Sysbench stress testing task.

    Note

    The following sections use the oltp_write_only mode as an example.

  6. After a moment, click image.png to refresh the task list. The stress testing task that you created starts.

    Note

    The stress testing task lasts for 10 minutes. Complete the subsequent steps before the Estimated End Time.

  7. Click View Details to open the real-time stress testing page.

    As the stress testing task progresses, the overall cluster performance (measured in TPS) and the number of PCUs for the primary node change.

    • As the number of concurrent threads increases, the CPU utilization of the primary node rises, which triggers a scale-up of PCUs. The number of PCUs for the primary node scales up within seconds and gradually increases to 15 PCUs as the load increases.

    • The cluster's TPS also gradually increases with the number of PCUs. This shows that the processing power of PolarDB is enhanced by its serverless elasticity.

    • When the number of concurrent threads starts to decrease, the cluster load drops. The number of PCUs for the primary node remains stable for a period and then automatically scales down in 0.5 PCU decrements.

  8. (Optional) For a created task, you can go to the Serverless Elasticity & Price Competitiveness Observation page and click Experience Records. In the panel that appears, click All Tasks or My Tasks to view the details of the experience results.

Exclusive experience

In addition to the free experience of PolarDB Serverless elasticity, Alibaba Cloud also offers an exclusive experience. You can quickly deploy a set of resources in your own environment. You can use our pre-configured data for testing or use your own business data for further trials.

In the exclusive experience, an ECS instance and a PolarDB for MySQL version 5.7 serverless cluster are created. These resources belong to you. The resources use the pay-as-you-go billing method. You will be charged based on the duration of use or the amount of storage used.

Important

The actual costs are subject to the information displayed in the console and on your bill.

Notes

  • This exclusive experience automatically adds a whitelist named yaochi_solution_security_group to the created PolarDB for MySQL serverless cluster. The IP address range is 47.96.15.227, 47.97.156.229. To ensure the stress test runs smoothly, do not delete or edit this whitelist.

  • To ensure the stress testing task runs smoothly, a database account is created for the PolarDB for MySQL serverless cluster each time you create a task. The username and password follow these rules:

    • Username: yaochi_[6 random digits]

    • Password: yaochi@[8 random uppercase letters, lowercase letters, and digits]

  • After the stress testing task ends, this database account is automatically deleted.

Important

After the stress testing task ends, the created resources are not automatically released. If you no longer need these resources, release them manually as prompted on the page. Otherwise, you will continue to be charged for them.

Stress testing task description

In the exclusive experience, we also provide a pre-configured stress testing task. You can start the task with a single click and observe the resulting performance trends.

Stress testing pace: The test starts with 4 threads. The number of threads increases by 16 every 30 seconds until it reaches the maximum of 64. After reaching 64 threads, the number of threads decreases by the same increment until it returns to 4. The test then continues at 4 threads until it ends.

Procedure

  1. Go to the Business Foundation System Solution Center.

  2. Click Performance and Price Competitiveness Experience.

  3. On the Performance & Price Competitiveness Experience page, click Exclusive Experience on the Serverless Elasticity & Price Competitiveness Observation card.

  4. Deploy resources.

    1. On the right side of the page, click One-Click Deployment.

    2. On the Deploy Resources page, select a zone for the serverless cluster and click Activate Resources.

      Wait 3 to 5 minutes for the resources to be deployed and the stress test to be prepared.

  5. Start the stress test.

    1. In the upper-right corner, click the Create Task button.

    2. In the task list, click the View Details button.

  6. After a moment, you can observe how the serverless cluster scales with the changes in load.

    image

  7. If needed, you can create new stress testing tasks for further testing.

  8. Release resources. After you finish the experience, if you no longer need the created ECS instance, PolarDB for MySQL cluster, or other resources, release them promptly. Otherwise, you will continue to be charged for them.

    1. In the upper-left corner, click the arrow to return to the previous page.

    2. Click Release Resources and confirm the release.

Related topics

Contact experts

You can join the official DingTalk group for consultations and additional technical support. The DingTalk group number is 15855024344.