All Products
Search
Document Center

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

Last Updated:Feb 21, 2024

This topic describes how to change the types and the specifications or the number of database proxies for your ApsaraDB RDS for PostgreSQL instance. If the types and the specifications of the database proxies that are enabled for your RDS instance do not meet your business requirements or a large number of database proxies on the RDS instance remain idle, you can perform the operations provided in this topic. The system allows you to change the database proxy type between general-purpose and dedicated and change the specifications 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.

  4. In the dialog box that appears, configure Proxy Type and Proxy Specifications.

    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

        Recommend number of database proxies

        General-purpose

        (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.

        Dedicated

        (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.

      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 2. The number is obtained based on the following calculation: (8 + 4)/8 = 1.5. The result 1.5 is rounded up to 2. The recommended specification of database proxies is 4 CPU cores. The number is obtained based on the following calculation: 2 × 2 = 4.

  1. Configure Change Time and click OK.

Related operations

Operation

Description

ModifyDBProxyInstance

Changes the number of database proxies.

DescribeDBProxy

Queries the details of a database proxy.