A Global Database Network (GDN) is a network of multiple PolarDB clusters distributed across different regions. In a GDN, data is synchronized across all clusters. Each cluster can handle read requests, and write requests are forwarded to the primary cluster for processing.
Introduction
A Global Database Network (GDN) consists of one primary cluster and multiple secondary clusters. The primary cluster handles write requests, while the secondary clusters are distributed across different regions to handle local read requests. Below is an example where data is synchronized across all clusters over low-latency links, forming a single logical database:
Data synchronization mechanism
Then GDN leverages asynchronous physical replication for cross-region data synchronization. Technologies such as parallel physical log replay help keep the replication delay between the primary and secondary clusters within 2 seconds. This synchronization method does not affect the performance or stability of the primary cluster and ensures eventual consistency of data across the globe. Each cluster in a GDN provides read and write services and supports geo-disaster recovery.
Read/write splitting and request routing
The routing of read and write requests to clusters in a GDN is determined by the database proxy configuration of each cluster. Your application does not require code changes. Simply connect to the endpoint of the appropriate cluster, and requests are automatically routed based on the following logic:
Write requests, such as
INSERT,UPDATE, andDELETEstatements, other broadcast syntax such asSETstatements, and all requests within transactions are automatically forwarded to the primary node of the primary cluster for processing.Read requests are routed by default to the read-only nodes of the local secondary cluster for nearest 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.
GDN also provides a global domain name. This feature not only enables nearest access but also ensures the domain name remains unchanged after a primary cluster switchover.
Use cases
Active geo-redundancy (multi-region deployment) You can deploy your services across multiple regions. GDN's features, such as low-latency cross-region synchronization, cross-region read/write splitting, and nearest access, ensure that applications in each region achieve database access latency of less than 2 seconds.
| Geo-disaster recovery You can achieve cross-region high availability with GDN to improve data security and system availability. If the data center where the primary cluster is located fails, you can quickly restore your services by manually switching to a secondary cluster. GDN supports various architectures, such as a two-region three-data-center architecture.
Note A primary/secondary switchover in a GDN is typically completed in less than 5 minutes, but can take up to 10 minutes. During the switchover, a transient connection interruption of up to 160 seconds may occur. We recommend that you perform the switchover during off-peak hours and make sure that your application has a reconnection mechanism. |
Benefits
Cross-region deployment: Extend from a single-city deployment to a multi-region deployment without changing your application code.
Cross-region read/write splitting and nearest access: Read requests within the GDN are sent directly to the secondary cluster in the current region. 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 keep the cross-region replication delay between the primary and secondary clusters to less than 2 seconds. This significantly reduces read latency for applications that access data from non-central regions.
Scope
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 minor engine version 8.0.1.1.17 or later.
MySQL 5.7 with minor engine version 5.7.1.0.21 or later.
MySQL 5.6 with minor engine version 5.6.1.0.32 or later.
Nodes: 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 a request. 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 before you can add a read-only column store node. The cluster version must also meet one of the following requirements:MySQL 8.0.1 with revision version 8.0.1.1.48 or later.
MySQL 8.0.2 with revision version 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 minor 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 minor engine version below 8.0.1.1.42.
MySQL 8.0.2 with minor engine version below 8.0.2.2.23.
Clusters in a GDN do not support the database and table restoration feature.
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 based on the quota ID
polardb_mysql_gdn_region, and click Apply in the Actions column.A cluster can belong to only one GDN.
You can only create new clusters as secondary clusters. You cannot add an existing cluster as a secondary one.
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
When you use a GDN, you are charged for the clusters and any inter-region data transfer fees. Data transfer fees vary based on whether the transfer is cross-border.
Non-cross-border data transfer (Free)
Scenario: The primary and secondary clusters are both deployed in regions outside the Chinese mainland, or both are deployed in regions within the Chinese mainland.
Billing rule: Free.
Cross-border data transfer (Billable)
ImportantCross-border data transfer fees will be charged starting from 00:00 on January 1, 2026 (Singapore time). Before this date, this service is free.
Scenario: One of your clusters (primary or secondary) is deployed in a region outside the Chinese mainland, and the other is deployed in a region in the Chinese mainland.
Billing rule: USD 0.80 per GB, billed hourly. The fee is calculated based on the amount of Redo Log data that is physically replicated from the primary cluster to a cross-border secondary cluster within one hour. You can estimate this traffic fee 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 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 not only enables nearest access but also ensures the domain name remains unchanged after a primary cluster switchover.