All Products
Search
Document Center

ApsaraDB RDS:Change the types and the number of database proxies

Last Updated:May 14, 2024

If the types and the specification of the database proxies that are enabled for your ApsaraDB RDS for MySQL instance do not meet your business requirements or a number of database proxies on the RDS instance remain idle, you can perform the operations provided in this topic. This topic describes how to change the types and the specification database proxies for an RDS instance in the ApsaraDB RDS console and by calling an API operation. This topic also describes how to calculate the recommended specification of database proxies. The number of database proxies varies based on the specification of database proxies.

Prerequisites

The database proxy feature is enabled. For more information, see Enable the database proxy feature.

Usage notes

  • When you change the types and the specifications or the number of database proxies, new sessions are established to the database proxies of new specifications. This reduces the impact on your business. Sessions that are kept active on the database proxies of original specifications are retained for 8 hours and automatically go offline within the first maintenance window. Idle connections on the database proxies of original specifications are closed. We recommend that you perform the changes during off-peak hours and make sure that your applications can automatically reconnect to the database service.

  • If you change the types and the specifications or the number of database proxies for multiple times within a short period of time, the system retains only the sessions on the database proxies of original specifications before the most recent change.

  • The relationship between the number of database proxies and the specification of database proxies is calculated by using the following formula: Specification of database proxies = Unit specification of a database proxy × Number of database proxies. The unit specification of a database proxy is fixed as 2 CPU cores.

    For example, if the number of database proxies is 3, the specification of the database proxies is 6 CPU cores. The number is obtained based on the following calculation: 2 × 3 = 6.

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the left-side navigation pane, click Database Proxy.

  3. In the Basic Information section, click Modify Configuration. In the dialog box that appears, configure Proxy Type, Proxy Specifications, and Change Time. Then, click OK.

    Note
    • For more information about the differences between general-purpose database proxies and dedicated database proxies, see What are database proxies?

    • The recommended specification of database proxies is calculated by using the following formula:

      • Recommended specification of proxies = Recommended number of database proxies × Unit specification of a database proxy. The unit specification of a database proxy is fixed as 2 CPU cores.

      • The highest specification of a general-purpose database proxy is 16 CPU cores. The highest specification of a dedicated database proxy is 32 CPU cores. The following table describes how the recommended number of database proxies is calculated.

    Database proxy type

    RDS instance that runs RDS High-availability Edition

    RDS instance that runs RDS Cluster Edition

    Recommended number of general-purpose database proxies

    (Number of CPU cores of the primary RDS instance + Number of CPU cores of all read-only RDS instances that belong to the primary RDS instance)/4. The result is rounded up.

    (Number of CPU cores of the primary node + Number of CPU cores of all secondary nodes that belong to the primary node)/4. The result is rounded up.

    Recommended number of dedicated database proxies

    (Number of CPU cores of the primary RDS instance + Number of CPU cores of all read-only RDS instances that belong to the primary RDS instance)/8. The result is rounded up.

    (Number of CPU cores of the primary node + Number of CPU cores of all secondary nodes that belong to the primary node)/8. The result is rounded up.

    For example, if your primary RDS instance that runs RDS High-availability Edition has 8 CPU cores and its read-only RDS instance has 4 CPU cores, the recommended number of database proxies is 3. The number is obtained based on the following calculation: (8 + 4)/4 = 3. The recommended specification of database proxies is 6 CPU cores. The number is obtained based on the following calculation: 3 × 2 = 6.

Related operations

Operation

Description

ModifyDBProxyInstance

Modifies the database proxy settings of an instance.

DescribeDBProxy

Queries the details of the database proxy of an instance.