Help Center/ Distributed Cache Service/ User Guide (Kuala Lumpur Region)/ FAQs/ Redis Usage/ Does DCS for Redis Support Read/Write Splitting?How Do I Configure Read/Write Splitting for a Redis Cluster Instance?
Updated on 2024-07-29 GMT+08:00

Does DCS for Redis Support Read/Write Splitting?How Do I Configure Read/Write Splitting for a Redis Cluster Instance?

Configuration

  • For a Redis Cluster instance, you can query all master and replica nodes by running the CLUSTER NODES command. The client will connect to replicas and configure read-only access on them.

    Run the following command to query cluster nodes:

    redis-cli -h {redis_address} -p {redis_port} -a {redis_password} cluster nodes

    Read-only configuration on replicas is achieved through the READONLY command.