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 occur within a specific time range. Such events include exceptions, optimization suggestions, and auto scaling events. DAS detects exceptions for core metrics of a database. If an exception is detected, DAS 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.

  • Anomaly detection

    DAS detects exceptions 24/7 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
    DAS Rule- or threshold-based AI-based
    Monitored objects Based on metrics A variety of objects such as metrics, SQL statements, logs, locks, and O&M events
    Latency From five 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, you can restart the database instance or switch to a secondary instance. However, these solutions may not be effective. 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 Explorer feature for a database. 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 RDS console
    1. Log on to the ApsaraDB RDS console.
    2. In the left-side navigation pane, click Instances.
    3. On the Instances page, find the instance for which you want to enable the autonomy service, and click the instance ID to go to the instance details page.
    4. In the left-side navigation pane, choose Autonomy Service > Diagnostics.
    5. On the page that appears, click the Autonomy Center tab. Then, click Settings in the upper-right corner.
    6. In the Settings dialog box, turn on Enable Autonomy Service and click Determine.
  • 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 instance for which you want to enable the autonomy service and click the instance 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 Settings in the upper-right corner.
    6. In the Settings dialog box, turn on Enable Autonomy Service and click Determine.