All Products
Search
Document Center

ApsaraDB RDS:View or modify connection addresses and ports

Last Updated:Jun 20, 2026

RDS PostgreSQL instances support modifying connection addresses and ports. This topic describes how to view and modify connection addresses.

Basic Edition and High-availability Edition instances

Function introduction

RDS PostgreSQL instances provide connection addresses and ports for connecting to the instance. Connection parameters vary depending on the connection method. For more information, see Connect to a PostgreSQL instance.

Based on different usage scenarios, RDS PostgreSQL instances provide multiple types of connection addresses. You can view or modify them as needed:

Address type

Description

How to view and modify

Instance endpoint

Applies to all connection scenarios.

  • Internal endpoint: Low latency and high stability. For example, ECS instances in the same VPC access RDS using an internal endpoint.

  • Public endpoint: Used to access the RDS database over the public network.

View and modify instance endpoints and ports

Database proxy endpoint

If database proxy is enabled for your instance, use the database proxy endpoint to connect to the instance. This maximizes read/write splitting performance and reduces load on the primary instance.

For more information about database proxy, see What is database proxy.

Modify database proxy endpoint and port

Babelfish endpoint

If you enabled Babelfish when purchasing your RDS PostgreSQL instance, you can use the instance endpoint with the TDS port number to connect from a SQL Server client to your Babelfish for RDS PostgreSQL instance.

For more information about Babelfish, see Introduction to Babelfish.

Modify Babelfish for RDS PostgreSQL instance endpoint and port

View and modify instance endpoints and ports

Prerequisites

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the navigation pane on the left, click Database Connection to view the internal and public endpoints and ports.

  3. Click Change Endpoint.

  4. Select Connection Type, set the Internal Endpoint or Public Endpoint Endpoint prefix and Port, and click OK.

    Note
    • The endpoint prefix must start with a lowercase letter, end with a lowercase letter or digit, and contain only lowercase letters, digits, and hyphens (-). It must be at least 8 characters long. The total endpoint length (prefix + suffix) cannot exceed 63 characters.

    • The port range is 1000 to 5999.

    • Instances with Premium Local SSDs do not support port modification.

Modify database proxy endpoint and port

Prerequisites

Database proxy is enabled. For more information, see Enable database proxy.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

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

  3. In the Connection Information section, find the target proxy endpoint and click the image.png icon next to the endpoint.

  4. In the dialog box, set the Endpoint and Port, and then click OK.

    Note
    • Address prefix: Must start with a lowercase letter and be 2 to 40 characters long. It can include letters, digits, and hyphens (-).

    • Port range: 1000 to 5999.

    • You cannot modify the address type.

Modify Babelfish for RDS PostgreSQL instance endpoint and port

Prerequisites

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the navigation pane on the left, click Database Connection to view the internal and public endpoints and the Babelfish port.

  3. Click Change Endpoint.

  4. Select Connection Type: , set the Internal Endpoint or Public Endpoint Endpoint prefix and Babelfish TDS Port, and click OK.

    Note
    • The endpoint prefix must start with a lowercase letter, end with a lowercase letter or digit, and contain only lowercase letters, digits, and hyphens (-). It must be at least 8 characters long. The total endpoint length (prefix + suffix) cannot exceed 63 characters.

    • The port range is 1000 to 5999.

FAQ

  • Do I need to update the endpoint or port in my application after modifying it?

    You must modify it; otherwise, the application will not be able to connect to the database.

  • Does modifying an endpoint or port take effect immediately? Do I need to restart the instance?

    It takes effect immediately. No restart is required.

  • After I modify or release an endpoint, can I use the original address on another instance?

    Yes, you can.

  • Does a primary/secondary switchover affect the endpoint?

    No, it does not. The endpoint remains unchanged. Only the backend IP address changes, which does not affect your application.

Cluster Edition instances

Function introduction

Based on different usage scenarios, RDS PostgreSQL Cluster Edition instances provide the following types of endpoints. You can view or modify them as needed:

Address type

Usage Instructions

How to view and modify

Cluster read/write endpoint

Each Cluster Edition instance has one read/write endpoint that connects only to the current primary node. If a primary/secondary switchover occurs, this endpoint automatically connects to the new primary node. Use this endpoint for read/write operations.

Note

The read/write endpoint includes both internal and public endpoints. An internal endpoint is automatically generated after instance creation. You can apply for a public endpoint as needed.

  • Internal endpoint: Low latency and high stability. For example, ECS instances in the same VPC access RDS using an internal endpoint.

  • Public endpoint: Used to access the RDS database over the public network.

View and manage cluster read/write endpoints

Cluster read-only endpoint

You can create only one read-only endpoint per cluster to access one or more secondary nodes. You can add or remove nodes from the read-only endpoint and adjust node weights.

The read-only endpoint always maintains the number of secondary nodes you specify to ensure availability:

  • If a secondary node connected to the read-only endpoint fails, it is automatically rebuilt.

  • If a secondary node connected to the read-only endpoint is promoted to primary, a new secondary node is automatically added to the read-only endpoint.

View and manage cluster read-only endpoints

View and manage cluster read/write endpoints

The cluster read/write endpoint includes internal and public endpoints. An internal endpoint is automatically generated after instance creation. You can apply for a public endpoint as needed.

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Basic Information section, under Instance Topology Management > Database Connection, view and modify the cluster read/write endpoint and apply for a public endpoint.

    • View cluster read/write endpoint

      Hover your mouse over the read/write connection box. In the pop-up window, view the endpoint details.

      The pop-up window shows the read/write mode, internal endpoint and port (default is 5432), public endpoint, EndpointID, and alias. The internal endpoint is the cluster read/write endpoint. To enable public access, click Apply for Public Endpoint.

    • Modify cluster read/write endpoint or apply for public endpoint

      Click Edit. In the pop-up dialog box:

      • Click Change Endpoint to change the internal endpoint and port.

      • Click Change VPC to change the VPC and vSwitch.

      • Click Apply for to request a public endpoint.

        Note

        You can also click Application outside the network address directly.

View and manage cluster read-only endpoints

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Basic Information section, under Instance Topology Management > Database Connection, perform the required operation:

    Operation

    Notes

    Steps

    Add or delete cluster read-only endpoint

    • The instance status must be running.

    • Adding a read-only endpoint does not affect instance read/write operations.

    • You can add only one cluster read-only endpoint.

    • Multiple secondary nodes in the cluster can use one read-only endpoint for load balancing. A new read-only endpoint includes an internal connection by default.

    • Deleting a read-only endpoint does not affect the cluster read/write endpoint.

    • Deleting a read-only endpoint releases both internal and public connections and breaks existing connections.

    • Add Address

    • Click Add Endpoint. In the pop-up dialog box, enter or select the internal endpoint prefix, port, VPC, and vSwitch. Add the secondary nodes to access, then click OK.

    • Note

      When adding a read-only endpoint, you can adjust node weights as needed.

    • Delete Address

    • In the read-only connection box, click Delete. In the pop-up dialog box, click OK.

    View cluster read-only endpoint

    None.

    Hover your mouse over the read-only connection box. In the pop-up dialog box, view the read-only endpoint.

    Add or remove nodes from cluster read-only endpoint

    • The instance status must be running.

    • Adding nodes to the read-only endpoint does not affect existing persistent connections. New connections are load-balanced based on node weights.

    • Node configuration for the read-only endpoint applies to both internal and public connections.

    • Removing a node from the read-only endpoint causes 30–120 seconds of service unavailability for connections to that node. Connections to other nodes are unaffected.

    • Node configuration for the read-only endpoint applies to both internal and public connections.

    • At least one node must remain in the read-only endpoint.

    • Add node

      1. In the read-only connection box, click Edit. Select the node to add and click the 加入 icon.

      2. Adjust the weight of the new node as needed, then click OK.

    • Remove node

    • In the read-only connection box, click Edit. Select the node to remove and click the 删除 icon, then click OK.

    Adjust node weights in cluster read-only endpoint

    • The instance status is running.

    • At least one node must have a weight greater than zero.

    • Adjusting node weights does not affect existing persistent connections. New connections are load-balanced based on the updated weights.

    • Node configuration for the read-only endpoint applies to both internal and public connections.

    1. In the read-only connection box, click Edit.

    2. In the pop-up dialog box, adjust node weights, then click OK.

Related APIs

API

Description

Create an endpoint for an instance

Creates an endpoint for an RDS PostgreSQL Cluster Edition instance.

Query endpoint information for an instance

Queries endpoints for an RDS PostgreSQL Cluster Edition instance.

Modify endpoint connection information for an instance

Modifies endpoint information for an RDS PostgreSQL Cluster Edition instance.

Create a public endpoint

Creates a public endpoint for an RDS PostgreSQL Cluster Edition instance.

Release public endpoint

Releases a public endpoint for an RDS PostgreSQL Cluster Edition instance.

Delete an endpoint for an instance

Deletes an endpoint for an RDS PostgreSQL Cluster Edition instance.

Modify endpoint weight information for an instance

Modifies endpoint weight information for an RDS PostgreSQL Cluster Edition instance.

FAQ

  • Q: Why do CPU or memory usage differ when node weights are the same?

    A: SLB performs connection-based load balancing. Each connection consumes different amounts of CPU or memory resources, so usage may differ even with identical weights.

  • Q: Does adjusting node weights affect existing connections? Will service be briefly unavailable?

    A: No. Adjusting weights affects only new connections. Existing connections are unaffected, and service remains available.

  • Q: Can I set all node weights to 0?

    A: No. At least one node must have a weight greater than 0.

  • Q: Why do CPU or memory usage differ when node weights are the same?

    A: SLB performs connection-based load balancing. Each connection consumes different amounts of CPU or memory resources, so usage may differ even with identical weights.

  • Q: Can you remove all the nodes from the address?

    A: No. A cluster read-only endpoint must retain at least one node.