Change primary instance configuration for DuckDB analysis

更新时间:
复制 MD 格式

You can modify an RDS DuckDB-based analytical primary instance by changing the instance type and storage capacity, adjusting the node configuration, enabling automatic storage expansion, configuring the primary/secondary switchover policy, and changing the billing method to meet your business requirements.

Change the instance type and storage capacity

You can change the instance type to upgrade or downgrade its computing specifications. You can also expand the storage capacity. Reducing the storage capacity is not supported.

Prerequisites

  • Your Alibaba Cloud account has no unpaid renewal orders.

  • The instance is in the running state. If the instance is in the locked state, you must unlock the instance before you change its configuration.

Impacts

Parameter

Impact

Instance type

The specification change takes several minutes regardless of the data volume. The change involves a primary/secondary switchover that causes a service interruption of about 30 seconds. Perform this operation during off-peak hours and make sure that your application has an automatic reconnection mechanism.

Storage capacity

  • Expansion: The operation does not cause service interruptions. If a snapshot task is in progress on the cloud disk, the storage expansion starts after the snapshot task is complete.

  • Reduction: This operation is not supported.

Note

A specification change does not require you to manually restart the instance, cause data loss, or change the instance ID or endpoint.

Billing rules

The actual fee is subject to the price displayed in the console. For more information, see Billing rules for specification changes.

Procedure

Important

Orders for configuration changes cannot be canceled after they are submitted. Carefully evaluate your business requirements before you proceed.

  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. On the Basic Information page, find the Configuration Information section and click Change Configurations.

  3. (This step is required only for subscription instances.) In the dialog box, select a change method and click Next.

    The following change methods are available:

    Upgrade or Downgrade: The new configuration takes effect immediately. This method is supported for both subscription and pay-as-you-go instances.

    After you submit the change task, the system synchronizes data to a new instance. At the scheduled switchover time, the system remaps the original instance ID and endpoint to the new instance, so they remain unchanged for your application.

  4. On the Upgrade Instance page, modify the instance configuration. Make sure that the parameters of the new instance type meet your requirements.

  5. Select a Switching Time.

    • Switch Immediately: The switchover is performed immediately after data migration is complete.

    • Switch Within Maintenance Window: The switchover is performed within the specified maintenance window.

    Important
    • After you submit a specification change task for an RDS DuckDB-based analytical primary instance, if the task does not involve a switchover or cause a service interruption, the system ignores the specified maintenance window and completes the task immediately. The task is performed within the specified maintenance window only if it involves a switchover or causes a service interruption.

    • If you select Switch Within Maintenance Window, the instance remains in the Upgrading/Downgrading state until the switchover is complete. During this period, you cannot perform instance-level operations, such as specification changes, version upgrades, or cross-zone migrations on the instance.

    • If you only increase the storage capacity, the operation immediately takes effect and does not affect your services in most cases. You do not need to select Switch Within Maintenance Window.

  6. On the Upgrade Instance page, confirm the instance information before and after the change. Then, click Pay Now and complete the payment.

    Warning

    To ensure a stable specification change, do not perform DDL operations from the time you submit the order until the change is complete.

FAQ

Disk expansion

  • Q: I expanded the disk, but the instance is still locked. Why?

    A: If an instance is locked because its disk is full, the instance is automatically unlocked after the storage expansion task is complete. On the Basic Information page of the instance, click the Tasks icon in the upper-right corner to go to the Jobs page and view the task progress.

  • Q: Why does a storage expansion cause a service interruption?

    A: In most cases, a storage expansion does not cause a service interruption or require an instance switchover. For details, see the Impacts section.

  • Q: Does the free backup quota increase when I expand the storage?

    A: Yes. For more information, see Free backup quota.

  • Q: What are the rules for automatic storage expansion?

    A: For more information, see Configure automatic storage expansion.

Upgrade impacts

  • Q: How long will my service be unavailable if I upgrade the CPU, memory, and disk at the same time?

    A: The service is unavailable for several minutes, regardless of whether you upgrade a single or multiple resources. During the upgrade, an instance switchover or restart may occur, and most database, account, and network operations cannot be performed. We recommend that you perform specification changes during the maintenance window. For more information about the impacts of each change, see Impacts.

  • Q: What factors affect the duration of a specification change?

    A: A specification change for an RDS DuckDB-based analytical primary instance that uses cloud disks does not involve cross-machine migration. Therefore, the change is completed within minutes. For more information, see Impacts in this topic.

  • Q: Will changing the configuration affect my online services?

    A: For more information, see Impacts in this topic.

Connections and network

  • Q: Does the endpoint change after a configuration change?

    A: The endpoint, for example, rm-bpxxxxx.mysql.rds.aliyuncs.com, remains the same, but the underlying IP address may change. We recommend that you use the endpoint instead of the IP address in your application.

  • Q: How do I configure an automatic reconnection mechanism for my application?

    A: For Java applications, we recommend that you set the TTL to a value no more than 60 seconds. This allows the application to resolve the new virtual IP (VIP) address by performing a DNS query when the endpoint's VIP changes. For more information about how to set the TTL in Java, see the official JDK documentation.

Change node configuration

Add a node

Read and write operations on the instance are not affected when you add a node. After the node is added, you can configure the weights of the cluster's read-only endpoint to distribute traffic to the new node for load balancing. A single RDS DuckDB-based analytical primary instance supports a maximum of eight secondary nodes.

Prerequisites

The RDS DuckDB-based analytical primary instance is in the running state.

Billing rules

The actual fee is subject to the price displayed in the console. For more information, see Billing rules for specification changes.

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. On the Basic Information page, find the Instance Topology Management section and click Add or Delete Node.

  3. In the dialog box, select Add Node and click Next.

  4. In the Nodes section, click the plus icon or Add Node, and then configure the availability zone, instance type, and vSwitch for the new node as needed.

    Note

    To cancel adding the node, click the minus icon to the left of the node.

  5. Read the terms of service and click Pay Now.

    When the instance status changes from Adding node to running, the node is added.

Related operations

Delete a node

To ensure high availability, the instance must retain at least one primary node and one secondary node.

Prerequisites

The RDS DuckDB-based analytical primary instance is in the running state.

Billing rules

The actual fee is subject to the price displayed in the console. For more information, see Billing rules for specification changes.

Procedure

When you delete a node, connections to that node experience a brief service interruption, but other nodes are not affected. To ensure business continuity, we recommend that you set the read weight of the node to 0 before you delete it.

  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. On the Basic Information page, find the Instance Topology Management section and click Add or Delete Node.

  3. In the dialog box, select Delete Node and click Next.

  4. To the left of the node that you want to delete, click the minus icon.

    Note

    To cancel the deletion, click Restore to the left of the node.

  5. Read the terms of service and click Pay Now.

Related operations

After the node is deleted, we recommend that you immediately adjust the node configurations of the cluster read-only endpoint to distribute traffic to other nodes for load balancing.

Specifications and storage

RDS DuckDB-based analytical primary instances support different specifications for different cluster nodes. You can flexibly adjust the storage type and storage capacity to improve the instance's flexibility and cost-effectiveness.

Prerequisites

The RDS DuckDB-based analytical primary instance must meet the following requirements:

  • Instance status: running

  • The data replication mode between the primary and secondary nodes is Semi-synchronous or Asynchronous.

Limits

Parameter

Change method

Limits

Node specifications

You can change the specifications of a single node or the entire instance.

  • At least one node must have the same specifications as the primary node.

  • All nodes in the cluster must have the same product type and instance family.

Node storage capacity

You can change the storage capacity of only the entire instance. You cannot change the storage capacity of a single node.

  • Expansion: The operation does not cause service interruptions. If a snapshot task is in progress on the cloud disk, the storage expansion starts after the snapshot task is complete.

  • Reduction: This operation is not supported.

Note

You can view the node specifications in the topology diagram at the bottom of the Basic Information page.

Impacts

Parameter

Impact

Node specifications

The specification change takes several minutes regardless of the data volume. Changing node specifications triggers an instance switchover. We recommend that you perform this operation during off-peak hours and make sure that your application has an automatic reconnection mechanism. During the instance switchover, most database, account, and network operations cannot be performed. For more information, see Impacts of an instance switchover.

The specific impact of the instance switchover varies based on the changed node:

  • Change a secondary node only: The secondary node experiences a brief service interruption. The primary node is not affected.

  • Change the primary node: A primary/secondary switchover is triggered. The primary node and the secondary node involved in the switchover experience a brief service interruption.

Note

A specification change does not change the node ID or endpoint of the instance. You do not need to manually restart the instance after the change.

Billing rules

The actual fee is subject to the price displayed in the console. For more information, see Billing rules for specification changes.

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. On the Basic Information page, find the Configuration Information or Instance Topology Management section and click Specification Change.

  3. Select a Storage Type, Capacity, Desired Type, and Switching Time as needed.

  4. Read the Terms of Service and click Pay Now. On the confirmation page, review the change details and click Continue to complete the payment.

    Note

    The node configuration change takes several minutes. During the change, the instance is in the Upgrading/Downgrading state. After the change is complete, the instance status changes to Running.

Configure automatic storage expansion

If a database runs out of storage capacity, write operations may fail, which can cause data loss or even a database crash and disrupt your business. RDS DuckDB-based analytical primary instances support automatic storage expansion when storage usage reaches a specified threshold. The instance does not need to be restarted during the expansion, and your services are not affected. After the storage capacity is expanded, storage capacity cannot be automatically scaled down. To reduce storage capacity, you must perform the operation manually by following the instructions in Change the instance type and storage capacity.

Prerequisites

  • The instance is in the running state.

  • Your account has a sufficient balance to cover the expansion cost.

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. On the Basic Information page, find the Instance Resources section and click Settings to the right of Automatic Storage Expansion.

    image

    Note

    If the Settings button is not displayed, check whether the instance meets the Prerequisites.

  3. Configure the following parameters.

    Parameter

    Description

    Automatic Storage Expansion

    The switch that enables or disables automatic storage expansion.

    Available Space <=

    When the percentage of available storage drops to or below the specified threshold, automatic expansion is triggered.

    Note

    The amount of storage to be added is the greater of the following two values:

    • 5 GB. If the total storage capacity of the instance is less than 50 GB and the available storage is less than 10%, the expansion increment is 10 GB.

    • 15% of the current storage capacity of the instance. The result is rounded to the nearest multiple of 5.

    For example, if your current total storage capacity is 100 GB, 15% of which is 15 GB. Because 15 GB is greater than 5 GB, 15 GB of storage is added when the threshold is reached. The total storage capacity becomes 115 GB after the expansion.

    Maximum Storage Capacity

    The upper limit of the total storage capacity of the instance after expansion. This value must be greater than or equal to the current total storage capacity of the instance. The maximum value is 64 TB.

  4. Click OK.

Configure primary/secondary switchover

RDS automatically triggers a primary/secondary switchover if the primary node fails or requires emergency maintenance. During this process, a secondary node is promoted to become the new primary node. After the switchover, the instance endpoint remains unchanged, and applications automatically connect to the new primary node (the former secondary node) to ensure high availability. You can also manually trigger a primary/secondary switchover.

Background information

  • Automatic switchover: This feature is enabled by default. When the primary node fails and becomes inaccessible, the system automatically switches over to the secondary node. For more information about the triggers for a primary/secondary switchover, see Reasons for a primary/secondary switchover.

  • Manual switchover: You can manually perform a primary/secondary switchover even when automatic switchover is enabled. Manual switchovers can be used for disaster recovery drills or to meet requirements such as proximity-based connections in multi-availability zone scenarios.

Impacts

  • During a primary/secondary switchover, your service may be unavailable for up to 30 seconds. Make sure that your application has an automatic reconnection mechanism.

    If your application uses an earlier version of the Druid component for database connection management, connections may fail to recover automatically after a switchover. We recommend that you upgrade Druid to version 1.1.16 or later to avoid this issue.

  • A primary/secondary switchover does not change the instance endpoint, but the underlying IP address may change. If you use the instance endpoint, the switchover does not affect the normal operation of your application.

  • If an instance failure triggers the switchover, the process may take longer.

Manually switch primary and secondary nodes

  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 navigation pane on the left, click Service Availability.

  3. In the Availability Information section, click Switch Primary/Secondary Instance.

  4. In the Primary/Secondary Switchover dialog box, select the target secondary node that you want to promote to the primary node in the Secondary Node row.

  5. Select a switchover time and click Yes.

    Important

    During the primary/secondary switchover, most operations, such as managing databases and accounts or switching network types, cannot be performed. We recommend that you select Switch Within Maintenance Window.

Temporarily disable automatic primary/secondary switchover

The automatic primary/secondary switchover feature is enabled by default. When the primary node fails, a switchover to the secondary node is automatically performed. You can temporarily disable this feature in the following scenarios:

  • During high-traffic events such as sales promotions, to prevent a switchover from affecting system availability.

  • During major application upgrades, to avoid introducing other variables from a switchover.

  • During critical events or stability assurance periods, to prevent a switchover from affecting system stability.

  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 navigation pane on the left, click Service Availability.

  3. In the Availability Information section, click Automatic Primary/Secondary Switchover.

  4. Select Disable Temporarily, set the End Time for Temporary Disabling, and then click Yes.

    Note
    • After the End Time for Temporary Disabling is reached, automatic primary/secondary switchover is re-enabled for the instance.

    • By default, this feature is temporarily disabled for one day. You can set the end time to a maximum of 23:59:59 seven days later.

After the setting is complete, you can view the end time for the temporary disablement of automatic primary/secondary switchover on the Service Availability page.

View primary/secondary switchover logs

  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 navigation pane on the left, click Service Availability.

  3. In the Primary/Secondary Switching Logs section, specify a time range to view the primary/secondary switchover logs.

    image.png

FAQ

Instance switchover

Q: Do I need to manually switch back after a primary/secondary switchover?

A: No. The data on the primary and secondary nodes is identical. After a primary/secondary switchover, the former secondary node is promoted to the new primary node. No further action is required.

Recovery after switchover

Q: The instance does not return to the running state for a long time after a primary/secondary switchover.

A: When RDS triggers a high-availability switchover due to an exception, long-lived connections from the application may not detect the connection status change. If a socket timeout is not set, the application waits indefinitely for a response from the database and often disconnects only after several hundred seconds. During this period, some database connections may fail, and a large number of SQL exceptions occur. To avoid invalid connections, we recommend that you configure connectTimeout and socketTimeout to prevent indefinite waits during network errors and to ensure faster recovery.

The timeout values must be evaluated based on the workload and usage. In online transaction processing (OLTP) scenarios, we recommend that you set connectTimeout to 1 to 2 seconds and socketTimeout to 60 to 90 seconds. These values are for reference only.

Change billing method

Pay-as-you-go to subscription

Prerequisites

  • The instance is in the running state.

  • The instance has no unpaid orders to change its billing method to subscription.

Notes

  • You cannot release subscription instances, but you can unsubscribe from them to receive a refund. Three refund scenarios are available: 5-day unconditional refunds, standard refunds, and refunds for renewal orders that have not taken effect. For more information, see Rules for unsubscribing from a product.

  • If an instance has an unpaid order to change its billing method to subscription and you upgrade the specifications of the instance, the order becomes invalid. You must go to the Orders page to cancel the order before you can try again.

  • If the billing method change from pay-as-you-go to subscription spans the top of an hour, the previous hour is billed on a pay-as-you-go basis, and subscription billing starts from the next hour.

    For example, if you start the change at 09:55 and the billing method officially changes to subscription at 10:10, the period from 09:00 to 10:00 is billed on a pay-as-you-go basis, and subscription billing starts after 10:00.

    Note
    • Pay-as-you-go resources are billed on an hourly basis. Billing statements may be delayed. Check again later.

    • We recommend that you change the billing method 15 or 30 minutes before the top of an hour.

Procedure

  1. Log on to the ApsaraDB RDS console. In the navigation pane on the left, click Instances. In the top navigation bar, select the region where the target instance is located.

  2. Find the target instance. You can go to the Switch to Subscription Billing page in one of the following ways:

    • In the Billing Method column of the target instance, click Change to Subscription.

    • Click the instance ID. On the Basic Information page, find the Status section and click Change to Subscription to the right of Billing Method.

  3. Select a Duration and click Pay Now.

    Note

    The system generates an order to change the billing method to subscription. If the order is unpaid or canceled, you cannot purchase new instances or change the billing method to subscription. You can pay for or cancel the order on the Orders page.

Subscription to pay-as-you-go

Prerequisites

  • The instance is in the running state.

    Note

    If your subscription instance is locked due to expiration, you must first renew it. For more information, see Manually renew an instance.

  • Make sure that your Alibaba Cloud account has a balance of at least CNY 100. Otherwise, you cannot change the billing method of a subscription instance to pay-as-you-go.

Fees

When you change the billing method of a subscription instance to pay-as-you-go, the fee for the unused portion of your subscription is refunded to your original payment account.

For information about the specific amount, see Standard refund rules.

Refund amount = Amount paid for the order - Fee for used resources

Procedure

  1. Log on to the ApsaraDB RDS console. In the navigation pane on the left, click Instances. In the top navigation bar, select the region where the target instance is located.

  2. Find the target instance. You can go to the Switch to Pay-as-you-go Billing page in one of the following ways:

    • In the Billing Method column of the target instance, click Change to Pay-As-You-Go.

    • Click the instance ID. On the Basic Information page, find the Status section and click Change to Pay-As-You-Go to the right of Billing Method.

  3. Confirm the instance information, select the service agreement, and then click Pay Now to complete the payment.

What's next