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
Make sure that your database instances meet the following requirements:
- The source database instance is an ApsaraDB RDS for MySQL instance of the High-availability Edition, an ApsaraDB RDS for MySQL instance of the Enterprise Edition, a PolarDB for MySQL cluster of the Cluster Edition, a PolarDB for MySQL cluster of the Archive Database Edition, or a PolarDB-X 2.0 instance.
- The destination database instance is an ApsaraDB RDS for MySQL instance, a PolarDB for MySQL cluster, or a PolarDB-X 2.0 instance.
- The source instance and the destination instance are connected to DAS. For 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 and the destination instance. For more information, see Usage notes on DAS Professional Edition.
Note PolarDB-X 2.0 is supported only in the China (Hangzhou), China (Shanghai), China (Beijing),
China (Shenzhen), and Singapore (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.
Precautions
- To reduce network latency, you must deploy the stress testing client and the destination
database 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. Make sure that traffic can be sent from the client to the destination instance.
Pricing
- 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 destination database instance that you specify. For information about the pricing of the destination database instance, see the pricing of the corresponding database service.
- If you select DAS Automatic Purchase and Deployment in the Advanced Settings section, the system automatically creates a pay-as-you-go Elastic Compute Service (ECS) instance as the stress testing client. The specification of the ECS instance is selected based on the queries per second (QPS) of the source database instance and the specified playback rate. For more information about the pricing, 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.