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

Prerequisites

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

Overview

In the autonomy center, you can query events that occurred within a specific time range. For example, you can query 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 around the clock based on machine learning and fine-grained monitoring data. This detection mechanism can detect database exceptions faster than traditional threshold-based alerting methods. In traditional alerting methods, failures are detected after they occur.

    Item Traditional method DAS
    Technology Rule- or threshold-based AI-based
    Monitored objects Metrics A variety of objects, such as metrics, SQL statements, logs, locks, and O&M events
    Latency From 5 minutes to one or more days Near-real-time
    Detection method Fault-driven Exception-driven
    Periodic detection No Automatic and periodic
    Adaptability No Adaptive to services that have different characteristics
    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 database stability, you can use general 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 perform throttling on the SQL statements.

  • Exception snapshots

    After DAS detects an exception in a database, DAS starts to check 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 autonomy center service, DAS automatically checks high-risk SQL statements and generates detailed analysis and optimization suggestions.

    • To identify and optimize high-risk SQL statements,we recommend that you enable the SQL Explorer feature for a database. Otherwise, the SQL optimization feature can identify and optimize only slow SQL queries.
    • To generate effective optimization suggestions for SQL statements, DAS samples and analyzes 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. The instance details page appears.
    4. In the left-side navigation pane, choose Autonomy Service > Diagnostics.
    5. On the page that appears, click the Autonomy Center tab. Then, click Autonomy Service Settings in the upper-right corner.
    6. In the Settings dialog box, turn on the Enable Autonomy Service switch 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 page that appears, find the instance for which you want to enable the autonomy service and click the instance ID. The instance details page appears.
    4. In the left-side navigation pane, click Autonomy Center.
    5. On the Autonomy Center page, click Autonomy Service Settings in the upper-right corner.
    6. In the Settings dialog box, turn on the Enable Autonomy Service switch and click OK.