Database Autonomy Service (DAS) provides the intelligent stress testing feature. This topic describes how to create a stress testing task. A stress testing task for traffic generation is created as an example.

Prerequisites

MySQL databases are connected to DAS.
Note

Background information

The intelligent stress testing feature is applicable to the following scenarios:

  • In preparation for an upcoming business peak, check whether your current ApsaraDB RDS for MySQL instance needs to be scaled up.
  • Before you migrate an on-premises database to Alibaba Cloud, check whether the specifications of the destination ApsaraDB RDS for MySQL instance meet your business requirements.

Usage notes

  • To reduce the impact of network latency on stress testing, make sure that the stress testing client and the destination instance are in the same region. 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.
  • A stress testing task may last for hours and generate a large amount of traffic. We recommend that you use Object Storage Service (OSS) to store the traffic to be generated by the stress testing task. For more information, see OSS documentation.

Procedure

  1. Log on to the DAS console.
  2. In the left-side navigation pane, click Intelligent Stress Testing.
  3. On the Task Center page, click Create Task in the upper-right corner.
  4. In the Create Task dialog box, set the parameters as required.
    1. Set the Task type parameter based on your actual needs and enter a task name in the Task name field.
      Note In this example, set the Task type parameter to Traffic Generation Pressure Measurement.
      Task type Description
      Playback Pressure Measurement Replays the traffic that is captured from the source instance on the destination instance at a specified speed.
      Traffic Generation Pressure Measurement Based on analysis of the traffic that is captured from the source instance, generates traffic on the destination instance for continuous stress testing. The business model based on which the traffic on the destination instance is generated and the traffic distribution are basically consistent with those on the source instance. This accelerates data collection from the source instance and reduces storage costs and performance overheads.
      Peak pressure measurement Replays the traffic that is captured from the source instance on the destination instance at the maximum playback speed that is supported by the destination instance.
    2. In the Source Database dialog box, set the parameters, as described in the following table.
      Parameter Description
      Database Type The type of the source instance. The source instance must be a user-created MySQL database. By default, this parameter is set to MySQL and cannot be modified.
      Source Instance The ID of the source instance.
    3. In the Destination Database dialog box, set the parameters, as described in the following table.
      Parameter Description
      Database Type The type of the destination instance. The destination instance must be an ApsaraDB RDS for MySQL database. By default, this parameter is set to MySQL and cannot be modified.
      Destination Instance The ID of the destination instance.
      Privileged Account The name of a privileged account for the destination instance. For more information, see Create databases and accounts for an ApsaraDB RDS for MySQL instance.
      Password The password of the privileged account for the destination instance.
    4. In the Settings dialog box, set the parameters, as described in the following table.
      Parameter Description
      Traffic Capture Duration The duration of traffic capture on the source instance. Set this duration to at least 5 minutes.
      Duration of Pressure Measurement on the Target Instance The duration of continuous stress testing on the destination instance. This duration can be set to at most 1,440 minutes.
      Playback Speed The speed at which the traffic that is captured from the source instance is replayed on the destination instance. For example, if you set this parameter to 1, the traffic will be replayed at the original speed on the destination instance. If the playback speed you specified exceeds the maximum playback speed that is supported by the destination instance, the traffic will be replayed at the maximum playback speed.
    5. In the Pressure Measurement Related Resource dialog box, set the parameters, as described in the following table.
      Parameter Description
      ECS to Deploy Pressure Measurement Program The database gateway of the stress testing client. The stress testing task will be deployed and run on the Elastic Compute Service (ECS) instance where the database gateway resides. For more information .
      Benchmark Data Migration The configuration for migrating baseline data on the source instance to the destination instance by using Data Transmission Service (DTS). Set this parameter based on whether you have created or completed a migration task in DTS. Valid values: Create a DTS migration task, Enter the DTS migration task ID, and Data Migration Completed. For more information about DTS, see DTS documentation.
      DTS Migration Task Specification The specification of the migration task to be created in DTS. Valid values: small, medium, and large. This specification will affect the performance of stress testing. For information about how to choose an appropriate specification, see Specifications.
      OSS Endpoint The endpoint of the OSS bucket where you want to store the traffic to be generated by the stress testing task. For more information, see Basic concepts.
      OSS Bucket The name of the OSS bucket where you want to store the traffic to be generated by the stress testing task.
      AccessKey The AccessKey ID that is used to access the OSS bucket.
      SecretKey The AccessKey secret that is used to access the OSS bucket.
  5. Click OK.
  6. After the stress testing task is created, go to the Task Center page. Find the task and click Details in the Actions column. You can view the execution status of the task and the stress testing report.
    Note If you need to terminate the stress testing task before it is completed, click Stop in the Actions column.