A global database network (GDN) consists of multiple PolarDB clusters that are distributed across regions around the world. This topic describes how to view cluster endpoints of a GDN and how to connect to a GDN.
Endpoints of a GDN
A GDN does not provide an endpoint. However, each cluster in the GDN provides a separate cluster endpoint. Applications in each region use the endpoint of the cluster that is deployed in the same region to connect to the GDN.
Data is synchronized from the primary cluster to all secondary clusters in a GDN. In most cases, read requests are forwarded to the secondary cluster in the same region. Write requests are forwarded to the primary cluster. For more information about the read/write splitting feature of GDN, see Cross-region read/write splitting.
- The default cluster endpoint.
- Custom cluster endpoints whose Read/write Mode is set to Read and Write (Automatic Read-write Splitting).
- The primary endpoint and custom cluster endpoints in Read Only mode do not support read/write splitting.
- For more information about how to change Read/write Mode, see Create a custom cluster endpoint.
- To reduce the latency of data replication between the primary cluster and secondary clusters, we recommend that you enable Offload Reads from Primary Node and set the Consistency Level to Eventual Consistency when you create custom cluster endpoints on secondary clusters.
View cluster endpoints
- Log on to the PolarDB console.
- In the left-side navigation pane, click Global Database Network.
- Find the GDN that you want to manage and click GDN ID/Name.
- In the Clusters section, find the cluster for which you want to view the endpoints.
- Click View in the Cluster Endpoint column. In the dialog box that appears, you can view the cluster endpoints.
Connect to a cluster
Applications in different regions connect to the GDN by using the cluster endpoint of the cluster that is deployed in the same region as the applications. The GDN automatically performs read/write splitting. For information about how to connect to a cluster, see Connect to a PolarDB for MySQL cluster.
Related API operations
|DescribeGlobalDatabaseNetworks||Queries the details about all global database networks (GDNs) that belong to an account.|
|CreateDBClusterEndpoint||Creates a custom cluster endpoint for a specified PolarDB cluster.|
|DescribeDBClusterEndpoints||Queries the information about an endpoint of a specified PolarDB cluster.|
|ModifyDBClusterEndpoint||Modifies the attributes of a specified PolarDB cluster endpoint, such as the read/write mode and the consistency level. You can also specify whether newly added nodes are automatically associated with the specified cluster endpoint.|
|DeleteDBClusterEndpoint||Deletes a custom cluster endpoint of a specified PolarDB cluster.|