All Products
Search
Document Center

ApsaraDB RDS:Modify read weights

Last Updated:Jan 12, 2024

During peak hours or in scenarios in which highly concurrent read operations are performed, you can modify read weights for the read-only routing endpoint of an ApsaraDB RDS for SQL Server instance based on your business requirements. The read-only routing endpoint automatically forwards read requests to secondary nodes or all involved read-only RDS instances based on the new read weights. This helps meet different business requirements and loads and maximizes the performance of read/write splitting.

Prerequisites

  • Your RDS instance is a primary RDS instance and meets 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 has at least one read-only RDS instance. For more information about how to create a read-only RDS instance, see Create a read-only ApsaraDB RDS for SQL Server instance.

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 Cluster Management.

  3. In the Basic Information section, click Configure Readonly Splitting Address . In the dialog box that appears, set Read Weight to Customized Distribution and configure Distribution.

    A higher read weight indicates more read requests to process. For example, if the primary RDS instance has three read-only RDS instances whose read weights are 100, 200, and 200, the read-only RDS instances process read requests at a ratio of 1:2:2.

    • Automatic Distribution: The system assigns a read weight to each read-only RDS instance based on the instance specifications. After you create a read-only RDS instance, the system automatically assigns a read weight to the created read-only RDS instance. You do not need to specify a read weight for the new read-only RDS instance. For more information, see Rules of weight allocation by the system.

    • Customized Distribution: You must specify a read weight for each RDS instance in your database system. Valid values: 0 to 10000. By default, the read weight of a read-only RDS is 0. After you create a read-only RDS instance, you must specify a read weight for the read-only RDS instance based on your business requirements.

    Note

    If you delete a read-only RDS instance, its read weight is also removed, but the read weights of other RDS instances remain unchanged.

  4. Click OK.

References