This topic provides answers to some frequently 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 also be sent to the primary RDS instance. You need only to specify a proper 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, does the current connection to the faulty read-only RDS instance fail over to another healthy read-only RDS instance?
No, the current connection to the faulty read-only RDS instance does not fail over to another healthy read-only RDS instance. You must wait until the current 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 in the following scenarios:
- 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 feature is enabled, the read/write splitting endpoint is the same as the dedicated proxy endpoint that is used. For more information, see Manage the dedicated proxy endpoints of an ApsaraDB RDS for MySQL instance.
Why are garbled characters returned when I query data?
select @@global.character_set_results, @@global.character_set_client, @@global.character_set_connection, @@global.character_set_server;
If the primary and read-only RDS instances use different character sets, you can modify the character sets of the primary or read-only RDS instances to ensure that the primary and read-only RDS instances use the same character sets. For more information about how to modify the character set of an RDS instance, see Description of character sets in ApsaraDB RDS for MySQL.