A Global Database Network (GDN) is a distributed network of PolarDB clusters that spans multiple regions. In this network, data is synchronized across all clusters. Each cluster can serve read requests, and write requests are automatically forwarded to the primary cluster for processing.
Overview
Basic edition | Multi-write edition |
A Global Database Network (GDN) consists of one primary cluster and multiple secondary clusters. The primary cluster handles write requests, while the secondary clusters, distributed across different regions, handle local read requests. Data is synchronized across all clusters over low-latency links, forming a single logical database. | In the GDN Basic Edition architecture, secondary clusters forward write requests to the primary cluster via cross-region routing. When the primary and secondary clusters are deployed across different regions and are physically far apart, the write latency on the secondary clusters increases significantly. The GDN Multi-write Edition provides a table-level multi-write solution. This allows each cluster to perform local writes on tables for which it has write permissions, effectively reducing cross-region write latency. For more information, see GDN multi-write edition user guide. Note The PolarDB GDN Multi-write Edition is currently in canary release. To use this feature, search for the group number in DingTalk and join the group for inquiries. DingTalk group number: 30245017864 |
Data synchronization mechanism
GDN uses asynchronous physical replication to synchronize data across regions. By using techniques such as parallel replay of physical logs, the data replication latency between the primary and secondary clusters is typically under two seconds. This process does not impact the performance or stability of the primary cluster and ensures eventual data consistency across the globe. Each cluster in the GDN can handle read and write requests and provides geo-disaster recovery capabilities.
Read/write splitting and request routing
The routing of read and write requests to clusters (primary and secondary clusters) in a GDN is determined by the database proxy configuration of each cluster. You do not need to modify your application code. Simply connect to the address of the respective cluster, and read and write requests are automatically routed based on the following logic:
The database proxy automatically forwards write requests, such as
INSERT,UPDATE, andDELETEstatements, other broadcast syntax such asSETstatements, and all requests within transactions to the primary node of the primary cluster for processing.By default, the database proxy routes read requests to the read-only nodes of the local secondary cluster for local access. If session consistency is enabled, some read requests may also be routed to the primary node of the primary cluster to ensure data consistency.
When an application connects to the cluster endpoint of a secondary cluster, the same routing rules apply. After a client establishes a connection with the database proxy, the proxy creates and maintains backend connections from the secondary cluster to the primary node of the primary cluster. Whether these connections are pre-established depends on the database proxy configuration. The link from a secondary cluster to the primary node is often a cross-region connection. For applications with short-lived connections, the frequent creation of these cross-region connections can degrade performance due to network fluctuations. In this scenario, we recommend that you enable On-demand Connections for the database proxy of the secondary cluster. For more information, see Configure a database proxy.
In addition, GDN provides a global domain name, which not only enables nearby access but also remains unchanged after a primary cluster switchover.
Use cases
Active geo-redundancy (multi-region deployment) Deploy your services across multiple regions. With features such as low-latency cross-region synchronization, cross-region read/write splitting, and local access, GDN ensures that database access latency for applications in each region is typically under 2 seconds.
| Geo-disaster recovery Use GDN to achieve cross-region high availability and improve data security and system availability. If the primary cluster's data center fails, you can restore service by manually failing over to a secondary cluster. GDN supports various architectures, such as two-region three-data-center, two-region four-data-center, and three-region six-data-center.
Note A primary/secondary switchover in a GDN can be completed within 10 minutes (tests show it takes less than 5 minutes). During the switchover, a transient disconnection of up to 160 seconds may occur. We recommend that you perform the switchover during off-peak hours and make sure your application has a reconnection mechanism. |
Benefits
Cross-region deployment: Extend from a single-region deployment to a multi-region deployment without changing your application code.
Cross-region read/write splitting and local access: In a GDN, read requests are routed to the local secondary cluster, while write requests are forwarded to the primary cluster.
Flexible configuration: The primary and secondary clusters have independent configurations, including cluster specifications, whitelists, and parameter values.
Low-latency cross-region synchronization: Asynchronous physical replication, based on redo log, and parallel replay technologies reduce the cross-region replication latency between the primary and secondary clusters. This ensures that data remains synchronized across all clusters with a replication latency of typically under two seconds, significantly reducing read latency for applications in remote regions.
Requirements and limitations
Cluster configuration
Edition: Enterprise Edition, and the series must be Cluster Edition.
The database engine version must be one of the following:
MySQL 8.0.2.
MySQL 8.0.1 with a minor engine version of 8.0.1.1.17 or later.
MySQL 5.7 with a minor engine version of 5.7.1.0.21 or later.
MySQL 5.6 with a minor engine version of 5.6.1.0.32 or later.
Nodes: The cluster must include at least one read-only node.
Supported regions
All regions in the Chinese mainland, China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London).
You can deploy secondary clusters across borders, but you must submit an application. For more information, see Add a secondary cluster.
Feature limitations
Clusters in a Global Database Network (GDN) support the In-Memory Column Index (IMCI) feature. However, you must enable the
loose_polar_enable_imci_with_standbycluster parameter and the cluster version must meet one of the following requirements before you can add a read-only column-oriented node.MySQL 8.0.1 with a revision version of 8.0.1.1.48 or later.
MySQL 8.0.2 with a revision version of 8.0.2.2.27 or later.
Clusters in a GDN can be serverless clusters or clusters with defined specifications that have the serverless feature enabled. However, if the database engine version of the primary cluster is earlier than the following versions, all clusters in the GDN must have at least one read-only node:
MySQL 8.0.1 with a minor engine version earlier than 8.0.1.1.42.
MySQL 8.0.2 with a minor engine version earlier than 8.0.2.2.23.
Clusters in a GDN do not support database and table restoration.
Other limitations
A GDN consists of one primary cluster and up to four secondary clusters.
NoteTo add more secondary clusters, go to Quota Center, find the quota item with the ID
polardb_mysql_gdn_region, and click Apply in the Actions column.A cluster can belong to only one GDN.
Only new clusters can be added as secondary clusters; you cannot use existing ones.
The primary and secondary clusters must use the same database engine version: MySQL 8.0, MySQL 5.7, or MySQL 5.6.
For secondary clusters in a GDN that are not serverless clusters, each compute node must have at least 4 CPU cores.
By default, each cluster in a GDN contains 2 nodes. You can add up to 16 nodes.
Pricing
Charges for a Global Database Network (GDN) consist of the cluster costs and any applicable cross-border data replication fees. The billing rules are as follows:
Cross-border data transfer fees will be charged starting from 00:00:00 on February 1, 2026 (UTC+8). Before this date, this service is free of charge. For more information, see [Notice] Announcement on network fee adjustment for Global Database Network (GDN).
Free scenarios:
Your primary and secondary clusters are both deployed in regions within the Chinese mainland, or both are deployed in the China (Hong Kong) region or other overseas regions. Examples:
Both the primary and secondary clusters are in the Chinese mainland. For example, the primary cluster is in China (Chengdu) and the secondary clusters are in regions such as China (Hangzhou) or China (Shenzhen).
Both the primary and secondary clusters are in the China (Hong Kong) region or other overseas regions. For example, the primary cluster is in Singapore and the secondary cluster is in Philippines (Manila).
Billable scenarios:
Cross-border fees apply when a GDN spans the Chinese mainland border—for example, if one cluster is in the Chinese mainland and another is in China (Hong Kong) or an overseas region. Examples:
The primary cluster is in the Chinese mainland and the secondary cluster is outside the Chinese mainland. For example, the primary cluster is in China (Chengdu) and the secondary cluster is in a region such as China (Hong Kong) or Singapore.
The primary cluster is outside the Chinese mainland and the secondary cluster is in the Chinese mainland. For example, the primary cluster is in Singapore and the secondary cluster is in a region such as China (Hangzhou) or China (Shenzhen).
Billing rule: CNY 5.6 per GB, billed hourly. The fee is calculated hourly based on the volume of redo log data physically replicated from the primary cluster to a cross-border secondary cluster. This traffic fee can be estimated by querying the physical position converted from the log sequence number (LSN).
If you use the global domain name feature, you will incur additional fees for internal DNS resolution and inter-region data transfer. For more information, see Global domain name pricing.
Get started
Create and manage a global database network: Select a cluster that meets the requirements to serve as the primary cluster of the GDN.
Add a secondary cluster: Go to the PolarDB buy page to add a secondary cluster to the GDN that you created.
Connect to a global database network: In a GDN, each cluster (primary and secondary) provides an independent cluster endpoint. You can connect to the endpoint of the nearest cluster based on your application's region. GDN also provides a global domain name. This feature provides local access and a stable endpoint that persists through a primary cluster switchover.
Contact us
If you have any questions about the Global Database Network (GDN) feature, join our DingTalk group by searching for the group number. In the group, you can directly ask questions or tag experts using @. The PolarDB intelligent assistant is also available 24/7 in the group to answer your questions.
DingTalk group number: 30245017864