tencent cloud

Feedback

Enabling/Disabling Read/Write Separation

Last updated: 2022-05-27 16:05:54

    Overview

    TencentDB for Redis supports read/write separation for business scenarios with more reads but less writes. This can well sustain read requests to hotspot data.

    Billing

    The read-only replica feature is currently in free trial.

    Overview

    • Enabling read/write separation may cause data read inconsistency (the data on replica nodes are older than that on the master node). Therefore, you need to check whether your business can tolerate data inconsistency first.
    • Disabling read/write separation may interrupt existing connections momentarily, so we recommend you do so during off-peak hours.

    Prerequisites

    • The database instance is on v4.0 or later.
    • The database instance is in Running status.

    Directions

    Enabling read/write separation

    1. Log in to the TencentDB for Redis console.
    2. Above the instance list on the right, select the region.
    3. In the instance list, find the target instance.
    4. Click the instance ID to enter the Instance Details page and click the Node Management tab.
    5. In the top-right corner of the Node Management tab, click next to Read-Only Replica.
    6. In the pop-up window, configure read-only replica nodes. The parameters are as detailed below:
      ParameterDescription
      Account Name It is fixed to the Default account; that is, the system can enable read-only replicas only for the default account.
      Command Permission It is fixed to Read/Write; that is, the default account has the read/write permissions.
      Read-Only Routing Policy It is Replica Node by default. You can also select Master Node or select both Replica Node and Master Node. Read requests are automatically routed to the configured read-only nodes by load balancing.
      Read Local Nodes Only This parameter will be displayed if the instance is deployed in multiple AZs. It is fixed to Disabled. You can configure the `read-local-node-only` parameter on the Parameter Settings page in the console to enable/disable this feature.
      Fees This feature is current in free trial.
    7. After confirming that the parameter settings are correct, click OK.
    8. The Instance Status will change to Processing. Wait for it to change to Running. Then, in the Specs Info section on the Instance Details page, you can see that Read-Only Replica is Enabled and try out read/write separation.

    Disabling read/write separation

    1. Log in to the TencentDB for Redis console.
    2. Above the instance list on the right, select the region.
    3. In the instance list, find the target instance.
    4. Click the instance ID to enter the Instance Details page and click the Node Management tab.
    5. In the top-right corner of the Node Management tab, click next to Read-Only Replica.
    6. In the Disable Read-Only Replica window, read the note on the impact of disabling read-only replica and click OK.
    7. The Instance Status will change to Processing. Wait for it to change to Running. Then, in the Specs Info section on the Instance Details page, you can see that Read-Only Replica is Disabled.
    API Description
    EnableReplicaReadonly Enables read/write separation
    DisableReplicaReadonly Disables read/write separation
    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