PolarDB for MySQL is a cloud-native HTAP database service developed by Alibaba Cloud. PolarDB for MySQL is fully compatible with MySQL 5.6, MySQL 5.7, and MySQL 8.0. PolarDB for MySQL Enterprise Edition uses the cloud-native architecture, decoupled compute and storage resources, and integrated software and hardware. This database service is characterized by high elasticity, high performance, high availability, high reliability, and cost-effectiveness.
Architecture
PolarDB for MySQL uses a cloud-native architecture that integrates the benefits of commercial databases, such as stability, reliability, high availability, and elasticity, with the benefits of open source cloud databases, such as ease of use, openness, and fast iteration. The following figure shows the architecture of PolarDB for MySQL.
Figure 1. PolarDB for MySQL architecture
The architecture of PolarDB for MySQL highlights the following features:
One primary node and multiple read-only nodes
PolarDB uses a distributed cluster architecture. A Cluster Edition cluster contains 1 primary node and 1 to 15 read-only nodes to ensure high availability. The primary node processes read and write requests, and the read-only nodes process only read requests. Cluster Edition clusters implement active-active failover between the primary node and read-only nodes. This method ensures high availability of databases.
Decoupled compute and storage
PolarDB decouples compute from storage. This allows you to scale clusters deployed on Alibaba Cloud based on your business requirements. The database compute nodes (database engine servers) store only metadata. The remote data nodes (database storage servers) store data, such as data files and redo logs. You need only to synchronize the metadata that is related to redo logs among your compute nodes. This reduces the replication delay between the primary node and read-only nodes. If the primary node is faulty, a read-only node can serve as the primary node in a short period.
Read/write splitting
Read/write splitting is a transparent, highly available, and adaptive load balancing feature that is provided by PolarDB Cluster Edition for free by default. The read/write splitting feature automatically forwards SQL requests to the different nodes of PolarDB Cluster Edition based on cluster endpoints, allowing clusters to process large amounts of concurrent requests in an aggregated manner. For more information, see Read/write splitting.
High-speed network connections
Data is transmitted among compute nodes and storage nodes of a cluster by using the Remote Direct Memory Access (RDMA) protocol over high-speed networks. I/O is no longer a limiting factor to database performance.
Shared distributed storage
Multiple compute nodes share one set of data. Each compute node does not need to store the same set of data. This significantly reduces your storage costs. The storage space can be smoothly scaled online by using the newly developed distributed storage and distributed file system. This feature is not limited by the storage space of a single database server and can cope with hundreds of terabytes of data.
Multiple data replicas and the Parallel-Raft protocol
The data on data nodes has multiple replicas, which ensures data reliability. In addition, the Parallel-Raft protocol is used to ensure data consistency among these replicas.
Core features
Turbocharged MySQL
Fully compatible with open source MySQL and ApsaraDB RDS for MySQL: You can migrate data from these databases to PolarDB for MySQL without changing the code or configurations of your applications.
Powerful features: one-to-many and many-to-many association for primary and read-only nodes, shared storage, high-speed processing for large tables (6 billion rows), smooth failover, flashback queries, and fast DDL queries (response times within seconds).
Native HTAP
Both transactional processing (TP) and analytical processing (AP) are performed in one place, reducing development and O&M costs.
No extract, transform, load (ETL) is required, ensuring reliable, real-time data analysis.
Multiple primary nodes (Multi-master Cluster Edition)
All nodes handle both read and write workloads. Nodes can be added to linearly scale write performance.
Nodes can be switched over within 5 to 10 seconds without business interruptions.
Worldwide geo-redundancy for disaster recovery
Geo-disaster recovery: ensures business continuity when a cluster fails in a region.
High resource utilization: Secondary clusters also provide both read and write capabilities.
Nearest access around the world improves business performance.
Why PolarDB for MySQL Enterprise Edition
PolarDB for MySQL can be used the same way as open source MySQL databases. PolarDB for MySQL delivers the following advantages:
Cost-effectiveness
Smart-SSD offers a high compression ratio that can reduce storage costs by 40% without affecting read/write performance.
Compute nodes share storage resources. You pay only for compute nodes when you add read-only nodes, which greatly reduces scale-out costs.
The storage space is automatically extended as the volume of your data grows. You pay only for the occupied storage space.
High elasticity
Nodes can be added or deleted in minutes, and they can be temporarily scaled up and down. Storage space is automatically scaled without business interruptions as your data volume changes.
The specifications of serverless clusters can be scaled within a second to cope with fluctuations in workloads.
High performance
The database engine that PolarDB uses has been optimized upon the open source engines. PolarDB also leverages capabilities like physical replication, RDMA protocol, and shared distributed storage to deliver six times the performance of open source MySQL databases.
High availability, reliability, and security
Shared distributed storage eliminates the data inconsistency issue that may occur when data is asynchronously synchronized from the primary node to secondary nodes. This ensures zero data loss if a single point of failure occurs in a cluster.
Multiple data replicas are deployed across zones. The RTO is less than 10 seconds when the primary node fails.
The GDN supports inter-cluster latency of less than two seconds, switchover in minutes, and active geo-redundancy. All-round and multidimensional protection methods ensure high availability.
PolarDB adopts various security measures such as IP whitelists, VPCs, and multiple data replicas to protect your data in terms of access, storage, and management.
Lock-free backup
Snapshots that are implemented based on the distributed storage can back up a database with terabytes of data in a few minutes. During the entire backup process, no locks are required, which ensures high efficiency and minimized impacts on your business.
PolarDB for MySQL provides the following editions: Cluster Edition, Multi-master Cluster (Database/Table) Edition, Single Node Edition, and X-Engine. For more information, see Editions.
How to use PolarDB for MySQL
The following methods are available for managing PolarDB for MySQL clusters. You can choose one or more to perform operations like creating clusters, databases, and accounts.
Console: The PolarDB console is a friendly web-based GUI.
CLI: You can use Alibaba Cloud CLI to perform all operations that are available in the PolarDB console.
SDK: You can use SDKs to perform all operations that are available in the PolarDB console.
API: You can call API operations to perform all operations that are available in the PolarDB console.
After a PolarDB for MySQL cluster is created, you can connect to the PolarDB for MySQL cluster in one of the following ways:
DMS: You can connect to a PolarDB cluster by using Data Management (DMS) and develop databases on the web pages of DMS. For more information, see Use DMS to connect to a cluster.
Client: You can connect to a PolarDB for MySQL cluster by using common database clients, such as MySQL-Front and HeidiSQL.