A global database network (GDN) consists of multiple 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. A GDN consists of the primary cluster and secondary clusters. 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 Configure the PolarDB proxy.
- We recommend that you set Primary Node Accepts Read Requests to No and Consistency Level to Eventual Consistency (Weak) when you configure the custom cluster endpoint for a secondary cluster. This mitigates the impact of the replication latency between the primary cluster and secondary clusters on your business. For more information about how to configure the custom cluster endpoint, see Configure the PolarDB proxy.
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. Note
- You can view only the default cluster endpoint that consists of the private endpoint and public endpoint.
- To view other endpoints, click Visit the Overview page of the cluster. For more information about how to manage endpoints, see Apply for a cluster endpoint or a primary endpoint.
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 cluster.
|DescribeGlobalDatabaseNetworks||Queries details about the GDNs that belong to an account.|
|CreateDBClusterEndpoint||Creates a custom cluster endpoint for a specified cluster.|
|DescribeDBClusterEndpoints||Queries the information about an endpoint of a specified cluster.|
|ModifyDBClusterEndpoint||Modifies the attributes of a specified 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||Releases a custom cluster endpoint of a specified cluster.|