All Products
Search
Document Center

PolarDB:Connect to a GDN

Last Updated:Oct 12, 2023

A global database network (GDN) consists of multiple PolarDB for MySQL clusters that are deployed in multiple regions within a country. 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.

1

Only the following cluster endpoints support read/write splitting:

  • The default cluster endpoint.

  • Custom cluster endpoints whose Read/Write is set to Read/Write (Automatic Read/Write Splitting).

    Note
    • 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, see Configure PolarProxy.

    • 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 PolarProxy.

View cluster endpoints

  1. Log on to the PolarDB console.

  2. In the left-side navigation pane, click Global Database Network.

  3. Find the GDN that you want to manage and click GDN ID/Name.

    Click the GDN
  4. In the Clusters section, find the cluster for which you want to view the endpoints.

  5. Click View in the Cluster Endpoint column. In the dialog box that appears, you can view the cluster endpoints.

    1
    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 Manage the endpoints of a cluster.

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.

Related API operations

Operation

Description

DescribeGlobalDatabaseNetworks

Queries details about the GDNs that belong to an account.

CreateDBClusterEndpoint

Creates a custom cluster endpoint for a specified PolarDB for MySQL cluster.

DescribeDBClusterEndpoints

Queries the information about an endpoint of a specified PolarDB for MySQL cluster.

ModifyDBClusterEndpoint

Modifies the attributes of a specified PolarDB for MySQL 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 PolarDB for MySQL cluster.