This topic describes the autonomy center of Database Autonomy Service (DAS) and how to enable the autonomy service for a database in the autonomy center.

Prerequisites

An ApsaraDB RDS for MySQL database or a PolarDB for MySQL database is connected to DAS.
Note For information about how to connect an Alibaba Cloud database to DAS, see Access an Alibaba Cloud Database instance.

Features

In the autonomy center, you can query events that occurred within a specified time range, including exceptions, optimization suggestions, and auto scaling events. DAS detects exceptions for core metrics of a database. If an exception is detected, DAS automatically checks sessions, SQL statements, and the capacity of the database to identify the cause. Then, DAS suggests operations for optimization or loss mitigation. You can authorize DAS to automatically perform these operations.

  • Exception detection

    DAS detects exceptions around the clock based on machine learning and fine-grained monitoring data. Compared with conventional threshold-based detection, DAS can detect exceptions in a database in a more timely manner.

    Item Conventional method DAS
    Technology Rule or threshold-based AI-based
    Monitored objects Metrics A variety of objects such as metrics, SQL statements, logs, locks, and operations and maintenance (O&M) events
    Latency From 5 minutes to one or more days Quasi real-time
    Detection method Fault-driven Exception-driven
    Periodic detection No Automatic and periodic
    Adaptability No Adaptive to different business features
    Prediction No Yes
  • Automatic SQL throttling

    Traffic-related exceptions may occur in a database, such as cache penetration, abnormal resource consumption of SQL statements in a released application, or a spike in the traffic from a specific application. In these scenarios, the database starts to terminate sessions. To restore the stability of the database, you may use common database O&M solutions, for example, restart the database instance or switch to a secondary instance. However, these solutions may not work. The autonomy center of DAS can automatically detect exceptions, find the problematic SQL statements, and then throttle the SQL statements.
  • Exception snapshots

    After DAS detects an exception in a database, DAS starts to diagnose the database engine to identify the root cause. If no root cause is found, DAS creates a snapshot of the database for further analysis.

  • SQL optimization

    After you enable the SQL optimization feature for a database, DAS automatically diagnoses high-risk SQL statements and generates detailed analysis and optimization suggestions.

    • We recommend that you enable the SQL Insight feature for an ApsaraDB RDS for MySQL database. In this way, DAS can identify and optimize all high-risk SQL statements in the database instead of only slow SQL queries.
    • To generate effective optimization suggestions for SQL statements, DAS needs to sample and analyze fields in conditions of the SQL statements within the O&M time window of the database.

Procedure

  • Enable the autonomy service in the ApsaraDB for RDS console

    1. Log on to the ApsaraDB for RDS console.
    2. In the left-side navigation pane, click Instances.
    3. On the Instances page, find the target instance and click its ID to go to the instance details page.
    4. In the left-side navigation pane, choose Database Autonomy Service (CloudDBA) > Diagnostics.
    5. On the page that appears, click the Autonomy Center tab. Then, click Switch Settings in the upper-right corner.
    6. In the Switch Settings dialog box, turn on Enable Autonomy Service and click OK.
  • Enable the autonomy service in the DAS console

    1. Log on to the DAS console.
    2. In the left-side navigation pane, click Instance Monitoring.
    3. On the Instance Monitoring page, find the target instance and click its ID to go to the instance details page.
    4. In the left-side navigation pane, click Autonomy Center.
    5. On the Autonomy Center page, click Switch Settings in the upper-right corner.
    6. In the Switch Settings dialog box, turn on Enable Autonomy Service and click OK.