You need to enable JavaScript to run this app.
RDS for PostgreSQL

RDS for PostgreSQL

Copy page
Download PDF
Managing connection endpoints
Enable or disable read/write separation
Copy page
Download PDF
Enable or disable read/write separation
RDS for PostgreSQL supports read/write separation based on a primary and multiple read architecture. After enabling this feature, read/write separation is automatic, forwarding read requests to read-only nodes. This topic introduces the procedure for enabling database read/write separation.​
Prerequisites​
An instance is created and in the Running state. For more details, refer to Creating an instance.​
Precautions​
  • Currently, only the default endpoint supports read/write separation.​
  • Enabling or disabling read/write separation generally takes about 60 seconds, which will cause 1 to 2 flash breaks in the business. Operate with caution. It is recommended that your application set up a reconnection mechanism to reduce the impact on the business.​
Procedure​
  1. In the upper-left corner of the top menu bar, select the project and region for the instance.​
tip​
If the project of the instance has not been set, the project should be selected as All resources.​
  1. On the Instances page, click the name of target instance and enter Summary page.​
  1. Click the Connectivity tab at the top of the page.​
  1. In the Connectivity tab's instance topology area, point the mouse at the default endpoint, then click Modify endpoint in the pop-up window to go to the Modify endpoint page.​
  1. On the Modify endpoint page, in the Read/Write separation configuration area, enable the rRead/Write separation switch and configure as needed.​
tip​
To disable read/write separation, disable the read/write separation switch here.​
  • ​
    Actions​
    Note​
    Number of read/write separation proxy connections​
    Set the number of read/write separation proxy connections for the default endpoint. The minimum number of proxy connections is 20; the maximum depends on the specification of the instance's primary node. Different specifications support different maximum numbers of proxy connections. For details, refer to Product specifications.​
    tip​
    When modifying the number of read/write separation proxy connections, the instance may experience a flash disconnection within seconds, operate with caution. It is recommended that you set a reconnection mechanism for your application to reduce the impact on your business.​
    Set read-only latency threshold​
    The value range of the read-only latency threshold is 0~3600s. Once a read-only latency threshold is set, read-only nodes with a latency that exceeds this value will not be assigned read-only requests.​
    tip​
    This feature is effective only when read/write separation is enabled.​
    Customize read/write separation weights​
    Read/Write separation weights are allocated automatically by default. On the Modify endpoint page, allocation weights can be customized. For more information about how to customize read/write separation weights, refer to Setting read-write separation weights.​
    tip​
    This feature is effective only when read/write separation is enabled.​
    ​
  1. Click OK.​
​
Last updated: 2025.11.17 16:15:03