tencent cloud

Feedback

Reading Local Nodes Only

Last updated: 2023-04-03 16:54:59
    To reduce the access latency of a multi-AZ deployed instance, TencentDB for Redis allows you to read local nodes only. The principle is as follows:
    Enable the "read-only replica" feature. Before you enable the feature, confirm that data delay of replicas is allowed.
    Enable the "read local nodes only" feature by setting a database parameter.
    If there is an available proxy node in the same AZ as the load balancing cluster, the cluster can perceive and access it only.
    The proxy node can access the AZ information stored in Redis nodes and route read requests to a Redis node in the same AZ.

    Enabling the "read local nodes only" feature

    The "read local nodes only" feature is disabled by default. You can enable/disable the feature for an existing instance by setting a database parameter on the Parameter Settings page in the console. Or, you can create a parameter template in which the parameter is specified and apply the template when creating an instance.
    1. Log in to the TencentDB for Redis console.
    2. Above the instance list, select the region.
    3. In the instance list, find the target instance.
    4. Click the target instance ID to enter the Instance Details page.
    5. On the Instance Details page, select the Parameter Settings tab.
    6. On the Parameter Settings tab, click the Modifiable Parameters tab, find read-local-node-only in the parameter list, and set it to yes.

    Reading local nodes only and read-only routing policy

    After enabling read-only replica in TencentDB for Redis as instructed in Enabling/Disabling Read/Write Separation, you can specify the read-only routing policy as described in Managing Account to control the distribution of account read requests to the master or replica nodes.
    After the read local nodes only feature is enabled, it has a higher priority than the read-only routing policy. In this case, nodes in the same AZ will be read first, and then the read-only routing policy will be executed.
    Read-only replica is enabled for the instance, and Read-only Routing Policy is set to Replica Node.
    The "read local nodes only" feature is enabled (read-local-node-only = yes).
    Only one master node exists in the master AZ.
    In this case, when the business in the master AZ accesses the proxy node in the master AZ, the proxy will ignore the read-only routing policy and route read requests to the master node in the master AZ to avoid reading across AZs.

    Related APIs

    API
    Description
    Upgrades an instance to support multi-AZ deployment
    
    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