Standard master-replica instances of ApsaraDB for Redis provide high-performance caching services and support high data reliability.

Overview

Standard master-replica instances of ApsaraDB for Redis run in a master-replica architecture. The master node serves your workloads and the replica node stays in a hot standby state to ensure high availability. If the master node fails, the system switches the workloads to the replica node within 30 seconds after the failure occurs. This mechanism guarantees the high availability for your workloads.

Architecture of a standard master-replica instance of ApsaraDB for Redis

Features

  • Reliability
    • Service reliability

      Standard master-replica instances adopt a master-replica architecture, with master and replica nodes deployed on different physical machines. The master node serves your workloads. You can use the Redis command-line interface (CLI) and common clients to add, delete, modify, and query data on the master node. Alibaba Cloud has developed a high-availability (HA) system for standard master-replica instances. If the master node fails, the HA system performs a failover to guarantee the high availability for your workloads.

    • Data reliability

      By default, data persistence is enabled for standard master-replica instances. Instances support data backup. You can clone or roll back an instance based on a specified backup set to restore data after misoperations. Instances created in zones that provide disaster recovery, such as Hangzhou Zones H and I, also support zone-disaster recovery.

  • Compatibility

    Standard master-replica instances of ApsaraDB for Redis are developed based on Redis 2.8 and compatible with all Redis commands. You can migrate your workloads on an on-premises Redis database to a standard master-replica instance of ApsaraDB for Redis without service disruption. Alibaba Cloud also provides Data Transmission Service (DTS) to support incremental migration to ApsaraDB for Redis. This ensures a stable transition for your business.

  • Proprietary systems developed by Alibaba Cloud
    • HA system

      ApsaraDB for Redis uses the HA system to detect failures on the master node, such as disk input and output (I/O) failures and CPU failures, and performs failovers to ensure high availability.

    • Master-replica replication mechanism

      Alibaba Cloud has customized the master-replica replication mechanism of ApsaraDB for Redis. You can replicate data in the format of incremental logs between the master node and the replica node. If the replication is interrupted, system performance and stability is unchanged and free from issues caused by the master-replica replication mechanism of native Redis databases.

      Some issues caused by the master-replica replication mechanism of native Redis databases are described as follows:

      • If the replication is interrupted, the replica node runs the Partial Resynchronization (PSYNC) command to resynchronize partial data. During this process, the resynchronization fails. Then, the master node synchronizes all RDB files to the replica node.
      • To synchronize all RDB files, the master node must perform full replication first due to the single-threading model. As a result, the master node has a latency of several milliseconds or seconds.
      • Child processes are created to perform copy-on-write (COW) tasks. The child processes consume memory on the master node. The master node may run out of memory and cause the application to exit abnormally.
      • The replica files that the master node generates consume disk I/O and CPU resources.
      • The replication of GB-level files may lead to outbound traffic bursts on the server and increase the sequential I/O throughput of disks. This delays responses and causes more issues.

Scenarios

  • Support for more native Redis features

    Standard instances are compatible with all Redis commands. You can migrate your workloads to instances without service disruption.

  • Persistent storage on an ApsaraDB for Redis instance

    Standard instances support data persistence, backup, and recovery features to ensure data reliability.

  • Stable query rate on a single node of ApsaraDB for Redis.

    Due to the single-threading model of native Redis databases, we recommend that you use a standard instance if your workloads support a query rate lower than 100,000 QPS. To achieve higher performance, select a cluster instance.

  • Use of simple Redis commands, where only a few sorting and computing commands are used

    CPU performance is the main bottleneck due to the single-threading model of native Redis databases. We recommend that you use a cluster instance of ApsaraDB for Redis to process a large number of sorting and computing workloads.