This topic provides answers to some frequently asked questions about database proxies in ApsaraDB RDS for MySQL.

Contents

What is a dedicated proxy?

A dedicated proxy is used as the network proxy between a database and an application. The dedicated proxy distributes all requests that are sent from the application to the database. The dedicated proxy is easy to use and maintain, and delivers high availability and high performance. The dedicated proxy also supports advanced features, such as automatic read/write splitting, transaction splitting, and connection pooling.

Why does the dedicated proxy feature remain unavailable after I update the minor engine version of my RDS instance that runs MySQL 5.7?

After you update the minor engine version of your RDS instance that runs MySQL 5.7, you must disable the original read/write splitting feature before you can use the dedicated proxy feature.

After I enable the dedicated proxy feature, do I need to use a dedicated proxy endpoint or the read/write splitting endpoint to implement read/write splitting?

After you enable the dedicated proxy feature, the read/write splitting endpoint is the same as the dedicated proxy endpoint that is used. ApsaraDB RDS uses a dedicated proxy endpoint to implement read/write splitting.

When I use a dedicated proxy endpoint to connect my application to my database system, what do I do if a connection timeout error is reported?

We recommend that you increase the value of the wait_timeout parameter and try again. For information about how to modify the parameters of an RDS instance, see Modify the parameters of an ApsaraDB RDS for MySQL instance.

How is the performance of a dedicated proxy? Is access to services affected when read and write workloads are heavy?

A dedicated proxy is a proxy service that distributes read/write requests to different RDS instances when the primary RDS instance is overloaded. This helps reduce the read and write workloads on the primary RDS instance. As a result, access to services is not affected when read and write workloads are heavy

Is the internal network type of a dedicated proxy the same as the internal network type of the primary RDS instance?

The internal network type of all dedicated proxies is virtual private cloud (VPC).

Does a dedicated proxy consume the QPS or TPS of a primary RDS instance?

No, a dedicated proxy does not consume the queries per second (QPS) or transactions per second (TPS) of a primary RDS instance.

Is a dedicated proxy endpoint the same as a regular endpoint?

No, a dedicated proxy endpoint is different from a regular endpoint.
  • A regular read/write endpoint forwards all requests that are sent only to the RDS instance.
  • A dedicated proxy endpoint automatically forwards write requests to the primary RDS instance and read requests to the read-only RDS instances. This helps reduce the workloads on the primary RDS instance.

After I enable the dedicated proxy feature, does ApsaraDB RDS reclaim the original endpoints of the primary RDS instance and read-only RDS instances in my database system?

No, ApsaraDB RDS does not reclaim the original endpoints of the primary RDS instance and the read-only RDS instances in your database system after you enable the dedicated proxy feature.

Does the number of dedicated proxy endpoints vary based on the number of dedicated proxy instances?

No, the number of dedicated proxy endpoints does not vary based on the number of dedicated proxy instances. You can apply for multiple dedicated proxy endpoints even if you have only one dedicated proxy instance. For more information, see Manage the dedicated proxy endpoints of an ApsaraDB RDS for MySQL instance.

Which architecture do dedicated proxies use? Does this architecture provide a failover mechanism?

Dedicated proxies use the high availability architecture. In this architecture, each dedicated proxy uses a secondary dedicated proxy as a standby. If a dedicated proxy becomes faulty, ApsaraDB RDS performs a failover to switch your workloads to the secondary dedicated proxy.

Is the number of connections that can be established to the dedicated proxy limited?

The maximum number of connections that can be established to the dedicated proxy is not limited. The maximum number of connections varies based on the specifications of the primary RDS instance and read-only RDS instances in your database system.

If my primary RDS instance processes a small number of write requests, can read requests also be sent to my primary RDS instance?

Yes, if your primary RDS instance processes a small number of write requests, read requests can also be sent to your primary RDS instance. You need to only specify a suitable read weight for your primary RDS instance. For more information about how to specify a read weight for your primary RDS instance, see Enable and configure the dedicated proxy feature for an ApsaraDB RDS for MySQL instance.

Does the read/write splitting feature support hints?

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

Is the current connection that is established to a read-only RDS instance switched over to a healthy read-only RDS instance when the current instance becomes faulty?

No, the current connection that is established to the faulty read-only RDS instance does not switch over to a healthy read-only RDS instance. You must wait until the current connection times out. After the current connection times out, a new connection is established to another healthy read-only RDS instance.

After I modify the read weights of the primary RDS instance 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 RDS instance and the read-only RDS instances not comply with the read weights of the instances?

This issue may occur in the following scenarios:

  • Requests contain transactions. All requests that contain transactions are routed only to the primary RDS instance. To handle requests that contain transactions, you can enable the transaction splitting feature. This feature helps reduce the loads on the primary RDS instance. For more information, see Transaction splitting.
  • The endpoints of the primary RDS instance and the read-only RDS instances are used to connect to your database system. As a result, requests are not routed to the primary RDS instance and read-only RDS instances based on the read weights of the instances. 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?

The character sets that are used on the primary RDS instance may be different from the character sets that are used on the read-only RDS instances. You can execute the following statement to check whether the primary RDS instance and the read-only RDS instances use the same character sets:
select 
@@global.character_set_results, 
@@global.character_set_client, 
@@global.character_set_connection, 
@@global.character_set_server;

If the primary RDS instance and the read-only RDS instances use different character sets, you can modify the character sets of the primary RDS instance or read-only RDS instances to ensure that these instances use the same character sets. For information about how to modify the character set of an RDS instance, see Description of character sets in ApsaraDB RDS for MySQL.