Enabling Read/Write Splitting
Read/write splitting enables read and write requests to be automatically routed through a read/write splitting address. This section describes how to enable read/write splitting.
Prerequisites
- There is at least one read replica created for the primary DB instance.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and a project. - Click Service List. Under Database, click Relational Database Service. The RDS console is displayed.
- On the Instance Management page, click the target DB instance. The Basic Information page is displayed.
- In the navigation pane on the left, choose Database Proxy.
Alternatively, in the Connection Information area on the Basic Information page, click Apply in the Read/Write Splitting Address field.
Figure 1 Applying for a read/write splitting address
- On the displayed page, click Enable now.
- In the displayed dialog box, click OK. Figure 2 Enabling database proxy
- Read/write splitting maintains database connectivity and splits read and write requests. After read/write splitting is enabled, an additional address called read/write splitting address is provided. You need to switch to this address for read/write splitting.
- Read/write splitting address: You can connect to databases through the read/write splitting address, with read and write requests automatically distributed.
The read/write splitting address and the floating IP address of the primary DB instance are in the same VPC and subnet and are independent from each other.
- Delay threshold: You can set the delay threshold after read/write splitting is enabled. For details, see section Configuring Delay Threshold and Distributing Read Weight.
- Read weight distribution: You can set read weights distributed to read replicas and primary DB instances after read/write splitting is enabled. For details, see section Configuring Delay Threshold and Distributing Read Weight.
Last Article: Introducing Read/Write Splitting
Next Article: Configuring Delay Threshold and Distributing Read Weight
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.