Database Autonomy Service (DAS) provides the intelligent stress testing feature. This feature helps you check whether you need to scale up your instance to handle workloads during peak hours. This topic describes how to create a stress testing task.
Prerequisites
- The source instance that you want to manage is of one of the following types:
- ApsaraDB RDS for MySQL High-availability Edition and Enterprise Edition
- PolarDB for MySQL Cluster Edition, X-Engine, and Multi-master Cluster (Database/Table)
- PolarDB-X 2.0
- The destination instance that you want to manage is of one of the following types:
- ApsaraDB RDS for MySQL
- PolarDB for MySQL
- PolarDB-X 2.0
- The source instance and the destination instance are connected to DAS. For more information about how to connect database instances to DAS, see Connect an Alibaba Cloud database instance to DAS.
- DAS Professional Edition is enabled for the source instance. For more information,
see Purchase DAS Professional Edition.
Note If you want to analyze and compare the performance of SQL execution on the source instance and the destination instance before and after the stress testing, you must also enable DAS Professional Edition for the destination instance. You can determine whether you need to upgrade the database engine that your instance runs or change the specifications of your instance based on the performance differences in the SQL execution.
Note PolarDB-X 2.0 is supported only in the China (Hangzhou), China (Shanghai), China (Beijing),
China (Shenzhen), and Singapore regions.
Scenarios
- Check whether your database instance needs to be scaled up or scaled out to handle workloads during peak hours.
- After the schema, especially the indexes, of a database is changed, check the performance of the database in real business scenarios to reduce the risk of failures.
- After a database failure occurs, use this feature to recur the failure on a cloned database of the source database to identify the failure cause.
Usage notes
- To reduce network latency, you must deploy the stress testing client and the destination
instance in the same region.
Note We recommend that you deploy the stress testing client and the destination instance in the same virtual private cloud (VPC).
- Before you perform stress testing, you must check the connectivity between the stress testing client and the destination instance to ensure that traffic can be sent from the client to the destination instance.
Billing
- For more information about the pricing of DAS Professional Edition, see Pricing of DAS Professional Edition.
- After you create a stress testing task, you are charged based on the following rules:
- If you use the Restore by Backup method to migrate data, the system creates a pay-as-you-go database instance based on the type of the destination instance that you specify. For information about the pricing of the destination instance, see the pricing of the corresponding database service.
- If you select DAS Automatic Purchase and Deployment in the Advanced Settings section, the system creates a pay-as-you-go Elastic Compute Service (ECS) instance based on the queries per second (QPS) of the source instance and the specified playback rate. For more information about the pricing of ECS instances, see ECS billing methods.
Note To reduce costs, we recommend that you delete the pay-as-you-go instances that are created by the system after the stress testing task is completed.
Procedure
In the following example, a Playback Traffic Stress Test task is created.