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 hot standby mode 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

Key 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 Zone H and Zone I, also support zone disaster recovery.

  • Compatibility

    Standard instances are compatible with all Redis protocols. 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. This resolves 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 in the following section:

      • If the replication is interrupted, the replica node runs the Partial Resynchronization (PSYNC) command to resynchronize partial data. During this process, if the resynchronization fails, the master node synchronizes all RDB files to the replica node.
      • To synchronize all RDB files, the master node must perform a full replication as a response to the single-threading mode. 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 protocols. 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.

    The single-threading mode of native Redis databases is applied. Therefore, if your workloads support a query rate of lower than 100,000 QPS, we recommend that you use a standard instance. 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 mode 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.