Database Autonomy Service (DAS) provides the intelligent stress testing feature. This feature helps you check whether you need to scale up your instance to effectively handle workloads during peak hours.
Scenarios
Check whether your database instance needs to be scaled up 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-world business scenarios to reduce the risk of failures.
After a database failure occurs, use this feature to reproduce the failure on a cloned database of the source database to identify the failure cause.
Architecture
The following figure shows the architecture of the intelligent stress testing feature.
Source database: a database that will experience a significantly increased workload or a business change, or a database whose traffic needs to be captured to identify failures.
Destination database: a cloned database of the source database, which is used to play back the traffic captured from the source database.
Features
Conventional stress testing solutions are implemented based on existing stress testing tools such as sysbench and TPCC. Users can monitor how the performance of the tested object changes with different levels of stress by changing the rate of data reads and writes in restricted scenarios. These solutions automate operations such as data generation, stress testing, and report analysis. However, the testing results cannot indicate how the performance of a database instance changes in a real-world business scenario due to the significant differences between the SQL statements used by the stress testing tools and those executed in real-world business scenarios.
In comparison, the intelligent stress testing feature uses business traffic captured from production databases to reproduce the same or higher stress. Therefore, the testing results of DAS are convincing and more helpful for users to make decisions on business O&M. The intelligent stress testing is performed based on the sophisticated architecture that consists of a production database, a stress testing client, and the tested objects. This is designed to capture the traffic of the production database so that real traffic stress during a time period can be simulated for the tested objects. In addition, you can specify the playback speed of the traffic.
Compared with conventional stress testing solutions, the intelligent stress testing feature provided by DAS has the following advantages:
Traffic capture with small loads
Stress testing by playing back traffic
Stress testing with the original transaction sequence
Ready-to-use
Prerequisites
The source database instance that you want to manage is of one of the following types:
RDS MySQL
PolarDB for MySQL
NotePolarDB for MySQL Single Node Edition is not supported.
PolarDB-X 2.0
The destination database 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 database instance and the destination database 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 Enterprise Edition is enabled for the source database instance. For more information, see Enable and manage DAS Economy Edition and DAS Enterprise Edition.
NoteIf you want to analyze and compare the performance of SQL execution on the source database instance and the destination database instance before and after the stress testing, you must also enable DAS Enterprise Edition for the destination database instance. You can determine whether to update the database engine that your database instance runs or change the specifications of your database instance based on the performance differences in SQL execution.
DAS supports the intelligent stress testing feature for PolarDB-X 2.0 only in the China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), and Singapore regions.