This topic describes the deployment mode of PolarDB-X and the O&M capabilities provided by PolarDB-X, including automated O&M, resource monitoring, SQL query analysis and optimization, and backup and restoration.

Deployment mode

PolarDB-X is an Alibaba Cloud service that is available for commercial use. Alibaba Cloud provides diverse services and dedicated technical support for PolarDB-X. For example, PolarDB-X can be delivered in a variety of modes and provides various OpenAPI operations. You can use PolarDB-X together with other tools in the Alibaba Cloud ecosystem.

PolarDB-X is a Database Platform as a Service (dbPaaS) offering that provides a unified portal to perform O&M on database instances. You can independently manage database instances by using the built-in PolarDB-X console or call OpenAPI operations.

PolarDB-X is a dbPaaS offering that is developed based on Kubernetes. This way, PolarDB-X supports various delivery modes. You can deploy PolarDB-X instances on Alibaba Cloud or in a hybrid cloud. PolarDB-X provides flexible options to allow you to deploy database instances on Alibaba Cloud or in a large-scale industry cloud. PolarDB-X supports Apsara Stack Enterprise and DBStack. This way, you can use PolarDB-X in a hybrid cloud. DBStack allows you to use PolarDB-X in lightweight mode. If you use PolarDB-X on DBStack in a production environment, you can deploy three servers in minimum.

Automated O&M

Multiple features are available in the PolarDB-X dbPaaS console. For example, you can create or release an instance, back up and restore data, manage configurations, configure the monitoring and alerting features, and analyze and optimize SQL queries in the PolarDB-X console. In the console, you can manage databases, users, permissions, and parameters. You can also perform routine O&M operations in the console. For example, you can back up data and configure the monitoring and alerting features. If you want to connect PolarDB-X instances to other systems, PolarDB-X dbPaaS provides various OpenAPI operations. You can call the API operations to manage instances and databases, query monitoring data, and manage parameters. For more information about the API operations provided by PolarDB-X, see List of operations by function.

Resource monitoring and SQL query analysis and optimization

Resource monitoring

In the PolarDB-X console, you can view the monitoring data of computing resources, storage resources, databases, and other resources. You can create alert rules based on the monitoring metrics.
  • You can view the monitoring data of computing resources that are provided by compute nodes. The monitoring metrics include the CPU utilization, memory usage, inbound and outbound network traffic, queries per second (QPS), query latency, number of frontend connections, and number of active threads.
  • You can view the monitoring data of storage resources that are provided by storage nodes. The monitoring metrics include the CPU utilization, memory usage, disk space usage, inbound and outbound network traffic, number of connections, number of active threads, IOPS, QPS, transactions per second (TPS), buffer pool usage, and number of temporary tables that are created.

SQL query analysis and optimization

PolarDB-X allows you to query the logs of SQL queries in real time and analyze the logs in a visualized manner. You can also configure alerts for SQL queries based on specific metrics. You can enable the SQL audit and analysis feature in the PolarDB-X console to audit and analyze the logs of SQL queries in real time. You can also customize real-time monitoring and alerting based on specific metrics. This way, if exceptions occur in your key business, you can receive notifications from multiple channels.

In the PolarDB-X console, you can view or terminate the sessions of an instance. In the Session Statistics section in the PolarDB-X console, you can view aggregated statistical data from different dimensions. For example, you can view the statistical data aggregated by client or by namespace. PolarDB-X provides the 10-second SQL analysis feature. If this feature is enabled, the system collects the session data per second within a period of 10 seconds, and then summarizes and analyzes the sampled data. The analysis result shows which SQL queries are most frequently run and whether slow SQL queries exist.

Slow query logs can help you identify SQL queries that decrease database performance. PolarDB-X provides a web-based UI to display slow query logs. On the page that displays slow query logs, you can view the templates of slow SQL queries and the details about each slow query. The details include the number of times that a slow query is run, the time that is required to run a slow query, and the number of rows returned by a slow query. PolarDB-X also supports the diagnosis and optimization of slow SQL queries. The system provides suggestions, such as creating a local index or a global index, to help you optimize slow queries based on the execution plans of the SQL queries.

The performance of your business may decrease if excessive resources are consumed by a small number of SQL queries. To resolve this issue, PolarDB-X provides SQL query throttling to limit the concurrency of specific queries. You can create throttling rules in the console to limit the maximum number of concurrent queries and the maximum length of a request queue.

Backup and restoration

Consistent backup and restoration

Consistent backup and restoration allow you to restore an instance based on historical data and perform a point-in-time recovery of an instance. The point in time that you can specify to restore an instance is accurate to seconds. Consistent backup and restoration are implemented based on full snapshot backup at regular intervals and the incremental backup of binary logs.

Table recycle bin

If the table recycle bin feature is enabled, the tables that are deleted or cleared are temporarily moved to the recycle bin. If you need to recover a table within two hours after the table is moved to the recycle bin, log on to the PolarDB-X console and go to the Table Recycle Bin page to find the table that you want to recover.

SQL query flashback

The SQL query flashback feature helps you fully or partially roll back operations that are accidentally performed. For example, if you accidentally delete some data from a table by executing a DELETE statement, you can use the SQL query flashback feature to generate an SQL statement that can recover the data. In this example, an INSERT statement is generated to insert the deleted data into the table.

Data import and export

Use CDC to provide logging for data changes

PolarDB-X is compatible with the protocol used in MySQL replication based on binary logs. You can use a PolarDB-X cluster as a regular MySQL database and synchronize data between the PolarDB-X cluster and another MySQL database.

PolarDB-X uses the Change Data Capture (CDC) component to generate logs to record data changes. The format of the logs generated by PolarDB-X is compatible with the binary log format in MySQL. The CDC component abstracts away the features for distributed databases, such as instance scaling, distributed transactions, and global indexes, and allows you to use a PolarDB-X cluster in the same manner as you use a standalone database. You can also use open source tools such as Canal to synchronize data that is written to a PolarDB-X cluster to another storage system.

Use PolarDB-X with other tools in the MySQL ecosystem

A key goal of PolarDB-X is to provide a database service that is compatible with the MySQL ecosystem. PolarDB-X is compatible with the communication protocols and SQL syntax of MySQL. You can use mysqldump and execute the LOAD DATA INFILE statement in PolarDB-X.

PolarDB-X is also compatible with other Alibaba Cloud database services, such as Data Management (DMS), Data Transmission Service (DTS), Database Backup (DBS), Database Autonomy Service (DAS), and DataWorks.