This topic provides answers to some commonly asked questions about the read/write splitting feature.

If the primary RDS instance processes a small number of write requests, can read requests be routed to the primary RDS instance?

Yes, if the primary RDS instance processes a small number of write requests, read requests can be routed to the primary RDS instance. To achieve this, you need only to specify a read weight for the primary RDS instance.

Does the read/write splitting feature support hints?

Yes, the read/write splitting feature supports hints. You can use hints to forcibly route requests to the primary RDS instance. For more information about the supported hint formats, see Rules of weight allocation by the system.

If a read-only RDS instance becomes faulty, new connections are established only to other healthy read-only RDS instances. In this case, is the current connection to the faulty read-only RDS instance automatically switched over to another healthy read-only RDS instance?

No, the current connection to the faulty read-only RDS instance is not automatically switched over to another healthy read-only RDS instance. You must wait until the connection times out. Then, a new connection is established to another healthy read-only RDS instance.

After I modify the read weights of the primary and read-only RDS instances, why do the new read weights not take effect?

The new read weights take effect only on new connections. The new read weights do not take effect on existing connections because the existing connections are not re-established.

Why do the loads on the primary and read-only RDS instances not comply with the specified read weights?

This issue may occur due to the following reasons:

  • Requests contain transactions. All the requests that contain transactions are routed only to the primary RDS instance. In this case, you can enable the transaction splitting feature. This feature reduces the loads on the primary RDS instance. For more information, see Transaction splitting.
  • The endpoints of the primary and read-only RDS instances are used to connect to your database system. As a result, requests are not routed to the primary and read-only RDS instances based on the specified read weights. In this case, you can use the read/write splitting endpoint or a dedicated proxy endpoint to connect to your database system.

Can I change the read/write splitting endpoint?

Yes, you can change the read/write splitting endpoint. If the dedicated proxy service is enabled, the read/write splitting endpoint is the same as the dedicated proxy endpoint that you are using. For more information, see Manage the dedicated proxy endpoints of an ApsaraDB RDS for MySQL instance.