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 in the example.

Prerequisites

A MySQL database is 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.
    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 Stress Testing.
      Task type Description
      Playback Stress Testing Replays the traffic that is captured from the source instance on the destination instance at a specific speed.
      Traffic Generation Stress Testing Generates traffic on the destination instance for continuous stress testing by analyzing the traffic that is captured from the source instance. 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 Stress Testing 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 section, set the parameters as described in the following table.
      Parameter Description
      Database Engine The type of the source instance. The source instance must be a self-managed 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 section, set the parameters as described in the following table.
      Parameter Description
      Database Engine 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 the 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 section, 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 five minutes.
      Stress Testing Duration in Destination Instance The duration of continuous stress testing on the destination instance. Set this duration 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 is replayed at the original speed on the destination instance. If the playback speed you specify exceeds the maximum playback speed that is supported by the destination instance, the traffic is replayed at the maximum playback speed.
    5. In the Stress Testing Resources section, set the parameters as described in the following table.
      Parameter Description
      ECS that Deploys Stress Testing Program

      The DBGateway of the stress testing client. The stress testing program is deployed and executed on the ECS instance where the DBGateway resides.

      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 DTS Migration Task, Enter 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 affects 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 complete, click Stop in the Actions column.