RDS PostgreSQL

Introduction to Database Proxy

2025-06-17 07:06:58

What is a database proxy?

RDS PostgreSQL Database Proxy is a component that provides read/write separation for a database, which can use a connection address to realize automatic forwarding of read/write requests.

Application Scenarios

           Scenarios where the request volume is very large, resulting in an overload of the database instance.

           Scenarios where the number of connections is high that the database instance is overloaded.

           Read-only scenarios or other isolation requirements.

Advantages of Read/Write Separation

Automatic Read/Write Separation

Provide a database proxy address, through which read/write requests can be forwarded automatically. You do not need to configure and maintain multiple addresses. Meanwhile, the native access method of the database is not affected.

The RDS read/write separation function provides a database proxy address. After connecting to this address, you can read/write the primary instance and read-only instance. The read/write request is automatically forwarded to the corresponding instance, thus reducing the maintenance costs.

Automatic Configuration

When adding and deleting read-only instances, you do not need to make any modifications. The database proxy application can automatically update the configuration.

Automatic Detection

The database proxy will check the primary instance and read-only instances in real time. When an instance or node exception is detected or when the node delay exceeds the threshold, the read request is no longer allocated to the instance. The read/write requests are allocated among the remaining healthy instances to ensure reliability in case of fault.

²  Note

           The proxy can only be enabled for high-availability instances, and not for single-node instances and read-only instances.

           The database proxy, read-only instance, and primary instance are all charged independently, without interrupting each other. For billing details, see Product Fees.

           The connection may be interrupted when you change the primary instance configuration or add/delete read-only instances.

           After the database proxy is enabled, when a read-only instance is added or restarted, only the request for a new connection will be forwarded to the new or the restarted read-only instance. The old connection request is not changed.

           Unsubscribing a proxy does not affect the database instance, and the original access mode of the database instance is not affected.

           When a primary instance is unsubscribed, the database proxy of the instance is also unsubscribed.

           Currently, the database proxy function is only enabled in Nanchang 5. To use this function, please select this resource pool.



Usage Method

For details, see Enabling a Database Proxy and Configuring a Database Proxy.


vWp5WmXQHL5z