Cluster architecture

Updated at: 2025-01-26 06:44

Tair (Redis OSS-compatible) supports multi-replica cluster instances and allows you to enable the read/write splitting feature for the cluster architecture. The cluster architecture resolves the bottlenecks of the single-threaded mode of open source Redis and meets the requirements for large capacity and high performance. The cluster architecture supports two connection modes: proxy mode and direct connection mode. You can select a connection mode based on your business requirements.

Proxy mode (recommended)

The proxy mode simplifies the use of cluster instances. You can connect to cluster instances in proxy mode in the same manner as you connect to standard master-replica instances. Proxy nodes automatically forward client requests to data shards and provide advanced features, such as hotkey data caching and failover. For more information, see Features of proxy nodes.

For more information about the architecture and components of a cluster instance in proxy mode, see the following figure and table.

Multiple replicas

Multi-replica cluster architecture in proxy mode

image

Components of the multi-replica cluster architecture in proxy mode

Component

Description

Proxy node

Proxy nodes forward client requests to data shards. In the cluster architecture, multiple proxy nodes provide services and support disaster recovery.

Data shard

Each data shard uses a high availability (HA) architecture in which a master node and up to four replica nodes are deployed on different hosts. You can deploy replica nodes in the secondary zone. The presence of multiple replica nodes enhances disaster recovery capabilities and reduces the risk of data loss.

HA system

If the master node fails, the system automatically switches workloads to a replica node within 30 seconds to ensure service availability and data reliability. If the instance is deployed in dual-zone mode and a replica node exists in the primary zone, workloads are preferentially switched to the replica node to prevent cross-zone access.

Enable read/write splitting

You can enable read/write splitting for the cloud-native cluster architecture in proxy mode. If the master node of a cluster instance is overloaded with read requests, you can enable read/write splitting. For more information, see Enable read/write splitting for cluster instances.

Direct connection mode

In direct connection mode, you can connect to a cluster instance in the same manner as you connect to an open source Redis cluster. The first time a client connects to the instance, the Domain Name System (DNS) resolves the private endpoint of the instance into a random virtual IP address (VIP). Then, the client can connect to the data shards of the instance over the Redis Cluster protocol. The cluster architecture in direct connection mode supports multiple replicas but does not support read/write splitting. The following figure shows the cluster architecture in direct connection mode.

Architecture of the cluster architecture in direct connection mode

image
Note

The direct connection mode and the proxy mode are different from each other. For information about the usage notes and usage examples of these connection modes, see Use the direct connection mode to connect to a cluster instance.

Scenarios

  • Large volumes of data

    Compared with the standard architecture, the cluster architecture can scale storage capacity to 16 TB (64 GB × 256 shards) to meet the requirements for business expansion.

  • High request load

    The standard architecture cannot handle high request load and requires multi-shard deployment to resolve the performance bottleneck of a single shard.

    If the master node of a cluster instance is overloaded with read requests, you can enable the read/write splitting feature.

    Note

    Only cloud-native cluster instances in proxy mode support read/write splitting. You can migrate data from non-cluster instances to cluster instances in proxy mode (for which read/write splitting is enabled) by creating instances and using Data Transmission Service (DTS) for data synchronization.

  • Throughput-intensive applications

    Compared with the standard architecture, the cluster architecture can linearly scale throughput by increasing the number of shards. This allows you to efficiently read hot data and manage high-throughput workloads.

  • Applications that involve few multi-key operations

    Cluster instances use a distributed architecture. In a distributed architecture, operations that involve multiple keys may be limited because all keys must reside in the same slot. For more information, see Limits on commands supported by cluster instances and read/write splitting instances.

  • Latency-sensitive applications

    For a dual-zone instance, you can increase the number of replica nodes in the primary zone. For example, you can include one master node and one replica node in the primary zone and one replica node in the secondary zone. This improves the reliability of disaster recovery and prevents increased latency caused by cross-zone access after a master-replica switchover.

Usage notes

  • You cannot enable the proxy and direct connection modes for the cloud-native cluster architecture at the same time. We recommend that you enable the proxy mode for the architecture.

  • The classic cluster architecture supports the master-replica model and does not support read/write splitting.

Operation guide for modifying cluster instance configurations

  • Add replica nodes: On the Node Management page of the instance details page, click Modify.

  • Add read replicas: On the Node Management page of the instance details page, turn on Read/Write Splitting and click Modify.

  • Add shards: In the upper-right corner of the instance details page, choose Shard Adjustment > Add Shards.

  • Change shard specifications: In the upper-right corner of the instance details page, choose Specification Adjustment > Specification Upgrade/Downgrade.

  • On this page (1, T)
  • Proxy mode (recommended)
  • Multiple replicas
  • Enable read/write splitting
  • Direct connection mode
  • Scenarios
  • Usage notes
  • Operation guide for modifying cluster instance configurations
Feedback