A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database-connecting.html below:

Connecting to Amazon Aurora Global Database

Connecting to Amazon Aurora Global Database

Each Aurora Global Database comes with a writer endpoint that is automatically updated by Aurora to route requests to the current writer instance of the primary DB cluster. With the writer endpoint, you don't have to modify your connection string after you change the location of the primary Region using the managed Aurora Global Database switchover and failover capabilities. To learn more about using the writer endpoint along with Aurora Global Database switchover and failover, see Using switchover or failover in Amazon Aurora Global Database. For information about connecting to an Aurora Global Database with RDS Proxy, see Using RDS Proxy with Aurora global databases.

Choosing the endpoint that meets your application needs

Connecting to an Aurora Global Database depends on your need to read or write from the database and the AWS Region you want to route your requests to. Here are a few typical use cases:

For details about the different kinds of Aurora endpoints, see Connecting to an Amazon Aurora DB cluster.

Viewing the endpoints of an Amazon Aurora global database

When you view an Aurora Global Database in the console, you can see all of the endpoints associated with all of its clusters. The following figure shows an example of the types of endpoints you see when you view the details for your primary DB cluster:

To view the endpoints of a global database
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Databases.

  3. In the list, choose the global database, or the primary or secondary DB cluster whose endpoints you want to view.

  4. Choose the Connectivity & security tab to see the endpoint details. The endpoints displayed depend on the type of cluster you selected, as follows:

To view the global cluster's writer endpoint, use the AWS CLI describe-global-clusters command, as in the following example.

aws rds describe-global-clusters --region aws_region
{
    "GlobalClusters": [
        {
            "GlobalClusterIdentifier": "global_cluster_id",
            "GlobalClusterResourceId": "cluster-unique_string",
            "GlobalClusterArn": "arn:aws:rds::123456789012:global-cluster:global_cluster_id",
            "Status": "available",
            "Engine": "aurora-mysql",
            "EngineVersion": "5.7.mysql_aurora.2.11.2",
            "GlobalClusterMembers": [

              ...
            ],
            "Endpoint": "global_cluster_id.global-unique_string.global.rds.amazonaws.com"
        }
    ]
}

To view the cluster and reader endpoints for member DB clusters of the global cluster, use the AWS CLI describe-db-clusters command, as in the following example. The values returned for Endpoint and ReaderEndpoint are the cluster and reader endpoints, respectively.

aws rds describe-db-clusters --region primary_region --db-cluster-identifier db_cluster_id
{
    "DBClusters": [
        {
            "AllocatedStorage": 1,
            "AvailabilityZones": [
                "az_1",
                "az_2",
                "az_3"
            ],
            "BackupRetentionPeriod": 1,
            "DBClusterIdentifier": "db_cluster_id",
            "DBClusterParameterGroup": "default.aurora-mysql5.7",
            "DBSubnetGroup": "default",
            "Status": "available",
            "EarliestRestorableTime": "2023-08-01T18:21:11.301Z",
            "Endpoint": "db_cluster_id.cluster-unique_string.primary_region.rds.amazonaws.com",
            "ReaderEndpoint": "db_cluster_id.cluster-ro-unique_string.primary_region.rds.amazonaws.com",
            "MultiAZ": false,
            "Engine": "aurora-mysql",
            "EngineVersion": "5.7.mysql_aurora.2.11.2",

            "ReadReplicaIdentifiers": [
                "arn:aws:rds:secondary_region:123456789012:cluster:db_cluster_id"
            ],
            "DBClusterMembers": [
                {
                    "DBInstanceIdentifier": "db_instance_id",
                    "IsClusterWriter": true,
                    "DBClusterParameterGroupStatus": "in-sync",
                    "PromotionTier": 1
                }
            ],

            ...
            "TagList": [],
            "GlobalWriteForwardingRequested": false
        }
    ]
}

To view the global cluster's writer endpoint, use the RDS API DescribeGlobalClusters operation. To view the cluster and reader endpoints for member DB clusters of the global cluster, use the RDS API DescribeDBClusters operation.

Considerations with using Global writer endpoints

You can make effective use of the Aurora Global Database writer endpoints by following these guidelines and best practices:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4