tencent cloud

Feedback

Read-Only Group

Last updated: 2024-07-30 16:21:58

    Overview

    TencentDB for SQL Server allows you to create one or more read-only instances to form a read-only group, which is suitable for read/write separation and one-primary-multiple-replica application scenarios and capable of greatly enhancing the read load capacity of your database.
    Note:
    In scenarios where an RO group contains only a single read-only instance, there exists a risk of a single point of failure. Moreover, such an RO group will not be included in the overall availability calculations for the Tencent Cloud SQL Server service. A single read-only instance does not offer an availability SLA guarantee. It is recommended to purchase at least two read-only instances for an RO group to ensure its availability.

    Prerequisites

    A primary instance must be created first before a read-only instance can be created. For more information, please see Creating TencentDB for SQL Server Instance.

    Directions

    Creating Read-Only group

    1. Log in to the TencentDB for SQL Server console. In the instance list, click an instance ID or Manage in the Operation column to enter the details page.
    2. Click Add Read-Only Instance in the Instance Architecture Diagram on the instance details page to enter the purchase page.
    
    3. On the purchase page, select the desired read-only instance configuration, confirm that everything is correct, and click Buy Now.
    Note:
    If the Specify RO Group option is configured as Create RO group, the following basic information of the new read-only group should be entered on the purchase page.
    RO Group Name: the group name doesn't have to be unique and can contain up to 60 letters, digits, hyphens, underscores, and dots.
    Remove Delayed RO Instances: this option indicates whether to enable the removal policy. If a read-only instance's delay exceeds the threshold, it will be removed and become inactive, and its weight will be set to 0. It will be put back into the read-only group when its delay falls below the threshold. No matter whether delayed read-only instance removal is enabled, a read-only instance that is removed due to instance failure will rejoin the read-only group when it is repaired.
    Delay Threshold: this sets a delay threshold for the read-only instance. When the threshold is exceeded, the instance will be removed from the read-only group.
    Least RO Instances: this is the minimum number of instances that should be retained in the read-only group. When there are fewer instances in the read-only group, even if an instance exceeds the delay threshold, it will not be removed.
    
    Specify Read-Only Group
    Description
    Assigned by system (not specified)
    If multiple instances are purchased at a time, each of them will be assigned to an independent read-only group, and their weights will be automatically assigned by the system by default.
    Create read-only group
    Create a read-only group. If multiple instances are purchased at a time, all of them will be assigned to this new read-only group, and their weights will be allocated by the system automatically by default.
    Existing read-only group
    Specify an existing read-only group. If multiple instances are purchased at a time, all of them will be assigned to this read-only group. Their weights will be allocated as configured in the read-only group. If assignment by the system is set for the read-only group, the instances will be added to the group automatically according to the purchased specifications. If custom allocation is set, their weights will be zero by default. As the same private IP is shared within a read-only group, if a VPC is used, the same security group settings will be shared. If a read-only group is specified, it is not possible to customize any security group when instances are purchased.
    4. Return to the instance list. The status of the created read-only instance is Delivering. If the status changes to Running, the instance has been successfully created.

    Configuring read-only group

    On the read-only group configuration page, you can configure the basic information of the group such as name, removal policy, delay threshold, least read-only instances, and read weight.
    Note:
    Read-Only instances in a read-only group can use different specifications, and their read traffic weights can be set.
    Read-Only instances in the same read-only group can have different expiration dates and billing modes.
    1. In the instance list, select a primary instance for which to set a read-only group, and click the Instance ID or Manage in the Operation column on the right to enter the instance management page.
    2. On the instance management page, click the Read-Only Instance tab and click Configuration to enter the read-only group configuration page.
    
    3. In the pop-up window, configure the read-only group options.
    
    RO Group Name: the group name doesn't have to be unique and can contain up to 60 letters, digits, hyphens, underscores, and dots.
    Remove Delayed RO Instances: this option indicates whether to enable the removal policy. If a read-only instance is removed, its weight will be automatically set to 0.
    Delay Threshold: this sets a delay threshold for the read-only instance. When the threshold is exceeded, the instance will be removed from the read-only group.
    Least RO Instances: this is the minimum number of instances that should be retained in the read-only group. When there are fewer instances in the read-only group, even if an instance exceeds the delay threshold, it will not be removed.
    Assign Read Weight: The RO group supports two methods of weight setting: automatic weight assignment by the system and custom weight assignment. The read-only address of the replica node does not participate in weight assignment. The range of the input weight is 0 - 100, and the input weight must be an integer. The system automatically sets the list of read weight values for SQL Server instances as follows:
    Instance Specification
    Weight
    2,000 MB memory
    1
    4,000 MB memory
    2
    8,000 MB memory
    2
    12,000 MB memory
    4
    16,000 MB memory
    4
    24,000 MB memory
    8
    32,000 MB memory
    8
    48,000 MB memory
    10
    64,000 MB memory
    12
    96,000 MB memory
    14
    128,000 MB memory
    16
    244,000 MB memory
    26
    488,000 MB memory
    50
    Rebalance: Modifying weight will only affect new loads if rebalancing is disabled. The operation has no impact on read-only instances accessed by existing persistent connections and does not cause momentary database disconnection. If rebalancing is enabled, all connections to the database will be temporarily disconnected, and the loads of newly added connections will be balanced according to the set weights.

    Enabling/Disabling Public Network Addresses for Read-Only Groups

    1. Log in to the SQL Server Console.
    2. Select the region, In the instances list, locate the primary instance for which you want to enable the public network address of the read-only group, and then click Instance ID or the Manage option in the Operation column.
    3. On the Instance Details page, select the Read-Only Instances tab, and then click Enable or Disable following the Public Network Address under the RO Group.
    
    4. Read the prompts displayed in the enabling or disabling public network settings window, and click Confirm . For more information on this operation, see Enabling or Disabling Public Network Addresses.

    Terminating and deleting read-only group

    Read-Only groups cannot be deleted manually.
    A read-only group will be automatically deleted when the last read-only instance in it is eliminated.
    Empty read-only groups cannot be retained.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support