All Products
Search
Document Center

ApsaraDB RDS:Restart a secondary RDS instance

Last Updated:Jan 03, 2024

ApsaraDB RDS instances that run SQL Server on RDS Cluster Edition support the secondary instance restart feature. If a secondary RDS instance encounters issues such as connection exhaustion or performance bottlenecks, you can manually restart the instance.

Prerequisites

  • The primary RDS instance must meet the following requirements:

    • The primary RDS instance runs SQL Server 2017 EE on RDS Cluster Edition, SQL Server 2019 EE on RDS Cluster Edition, or SQL Server 2022 EE on RDS Cluster Edition.

    • The primary RDS instance runs RDS Cluster Edition.

    • The primary RDS instance uses enhanced SSDs (ESSDs).

    Note

    You can go to the Basic Information page of the RDS instance to view the preceding information.

  • The primary RDS instance is in the Running state.

Impacts

  • If read/write splitting is disabled for the RDS instance, the system restarts the secondary RDS instance after a secondary instance restart task is initiated. During the restart, a transient connection occurs on the secondary RDS instance. The primary RDS instance is not affected. If read/write splitting is enabled for the RDS instance, all read-only requests are forwarded to the primary RDS instance during the restart of the secondary RDS instance. This does not interrupt read-only requests but increases the workloads on the primary RDS instance.Enable the read-only routing endpoint to implement read/write splitting To reduce the impact on your business, we recommend that you perform this operation during off-peak hours.

  • After you initiate a secondary instance restart task, the status of the RDS instance changes to Restarting. In this case, management operations are blocked but connections to the primary RDS instance are not affected.

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 upper-right corner of the page, click Restart Secondary Instance.

    image.png

  3. In the message that appears, click OK.

  4. In the dialog box that appears, complete SMS verification or multi-factor authentication (MFA).

Related operations

Operation

Description

RestartDBInstance

Restarts a secondary instance.

FAQ

  • Do the endpoints and IP addresses of the primary and secondary RDS instances change after the secondary RDS instance is restarted?

    No, the endpoints and IP addresses of the primary and secondary RDS instances remain unchanged after the secondary RDS instance is restarted. Restarting a secondary RDS instance does not involve changes to network settings.

  • What are the main phases that are involved when a secondary RDS instance is restarted? What factors affect the restart? How do I reduce the period of time that is required to restart the secondary RDS instance?

    Restarting a secondary RDS involves two phases.

    • The phase to stop the secondary RDS instance: The duration varies based on factors such as the overall performance of the host, the overall performance of the instance, and the dirty pages in the memory.

    • The phase to start the secondary RDS instance: The duration varies based on factors such as the overall performance of the host, the overall performance of the instance, and the size of the log files to be restored. In most cases, the size of the log files is related to the dirty pages in the memory when the instance is stopped and is related to whether long-running transactions exist. The size of the log files also varies based on the value of the recovery interval parameter. We recommend that you use the default value of the recovery interval parameter. If you want to change the value of this parameter, see the description in Configure the recovery interval Server Configuration Option.

    You can reduce the number of long-running transactions or change the value of the recovery interval parameter to reduce the period of time that is required to restart the secondary RDS instance.